pyahmed / PyCORN

A script to extract data from ÄKTA/UNICORN result-files (.res)
46 stars 25 forks source link

Options to select data to plot #15

Open ondrejtichacek opened 7 years ago

ondrejtichacek commented 7 years ago

Added parameter -w --wavelength to select data to plot. Plots all data if left empty. Multiple data rows can be selected as e.g. -w 215nm -w 280nm.

pyahmed commented 7 years ago

Wouldn't it be better to say -w1 -w2 -w3 etc? This way one does not need to know the wavelength that was actually used?

Guillawme commented 7 years ago

I agree it would be easier if the user doesn't have to know (or remember) the wavelength in advance.

Also, it should handle corner cases like the user asking for -w3 while no wavelength 3 was recorded in this dataset.

ondrejtichacek commented 7 years ago

I think if the users don't remember the exact wavelengths, they would usually plot all wavelengths first and then see which they like. Determining the data row by the wavelength is also very precise. Therefore I would like to keep this option.

I agree, the alternative option may be useful for someone, however, I see the following problems:

pyahmed commented 7 years ago

It would work like this: -w1 True/False [Default: True] -w2 True/False [Default: True if present] -w3 True/False [Default: False]

Judging by the systems/files that I have come across:

The reason I prefer the -w1/2/3 is that the command line does not change because of the wavelength, which is especially helpful when integrating pycorn-bin in a script. I think w1/2/3 would be sufficient, since I think there are no systems which have more than 3 wavelengths.

ondrejtichacek commented 7 years ago

I have access to two ÄKTA Purifiers, having three UV detectors, 215, 254, and 280 nm. The result files are, however, not entirely equal - the wavelengths are ordered differently: 280, 254, 215 on the first machine, 280, 215, 254 on the second one. Therefore, using for example -w1 -w2 would not yield the same result, but using -w 280nm -w 254nm would. I would find it very annoying to have to have two different scripts for plotting my data based on where I measured them.

Also, I think, by default, the script should plot everything - it might otherwise lead to confusion of new users.

pyahmed commented 7 years ago

Regarding ordering etc.. do the data series have a prefix like UV1, UV2 etc?

Current behaviour is to plot everthing unless it is set to 0nm ("off").

pyahmed commented 7 years ago

Could you send the output file naming patch separately?

ondrejtichacek commented 7 years ago

The data series from both machines have the same names - UV1_280nm, etc.

The latest commit is reverted - sorry, I didn't realise that it will affect this pull request.

pyahmed commented 7 years ago

Could you make a separte pull request with the output file naming only? Since that one can be merged easily.

ondrejtichacek commented 7 years ago

Yes, I'll do it as soon as possible. I'd like to first clean it up and possibly add more functionality regarding the output file names.