DrSAR / SARlabpy

git clone git@pfeifer.phas.ubc.ca:SARlabpy (do not push to github, please)
http://code.SARlab.ca
Other
1 stars 0 forks source link

Consist-ify accepted directories in readfid, read2dseq and other routines that accept directories #13

Closed firasm closed 11 years ago

firasm commented 11 years ago

Currently read2dseq takes in 'procdirname' which is the directory of the pdata file.

Namely: ~/data/study_name/scan_num/pdata/pdata_num/

This is inconsistent with readfid which takes in:

~/data/study_name/scan_num/

This is of course, sensible because fid file is two directories higher than the 2dseq file, and there can be multiple recons for each scan.

I propose that both routines take in:

~/data/study_name/scan_num/

and read2dseq adds /pdata/1 (by default) and if user inputs another number later, that number is used instead of 1 (i.e. 2)

DrSAR commented 11 years ago

If you import this to read the Zen of Python. You might find this nugget:

"In the face of ambiguity, refuse the temptation to guess."

However, if you can convince me of an unambiguous hierarchy of searches, I would agree we should implement this.

On 13-02-26 10:59 AM, firasm wrote:

Currently read2dseq takes in 'procdirname' which is the directory of the pdata file.

Namely: ~/data/study_name/scan_num/pdata/pdata_num/

This is inconsistent with readfid which takes in:

~/data/study_name/scan_num/

This is of course, sensible because fid file is two directories higher than the 2dseq file, and there can be multiple recons for each scan.

I propose that both routines take in:

~/data/study_name/scan_num/

and read2dseq adds /pdata/1 (by default) and if user inputs another number later, that number is used instead of 1 (i.e. 2)

— Reply to this email directly or view it on GitHub https://github.com/DrSAR/SARlabpy/issues/13.

DrSAR commented 11 years ago

This might become simpler when we start to think OOP on this

I would imagine the class BRUKER_scan would be initialized with a directory name. Maybe even a patient name. The access to fid, 2dseq and JCAMP would be through the object and we would hide the nitty gritty naming problems from the user.