PyCORN
PyCORN copied to clipboard
Options to select data to plot
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.
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?
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.
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:
- I don't know if there is a way how to define an arbitrary number of parameters -w1, -w2, -w3, ...
- The datasets are not ordered by wavelengths, which can be misleading
- The datasets may be ordered differently at different systems. For example, for data coming from different machines having different detectors, the option by exactly specifying the wavelength works better.
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:
-
ÄKTA Prime / Prime Plus: always only have a single wavelength, which is manually set to 260 or 280. Within the res file this is just labeled "UV"
-
ÄKTA Purifiers: Depending on UV detector, either single or three, labeled labeled UV1_###nm, UV2_###nm and UV3_###nm".
-
ÄKTA Pure: Same as Purifiers as far as I can remember.
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.
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.
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").
Could you send the output file naming patch separately?
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.
Could you make a separte pull request with the output file naming only? Since that one can be merged easily.
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.