astronomyk / PyReduce

GNU General Public License v3.0
1 stars 0 forks source link

Subclassing Instrument for MICADO #3

Open hugobuddel opened 3 years ago

hugobuddel commented 3 years ago

This issue is to discuss "[Hugo, Kieran?] A. Subclassing Instrument for MICADO (micado.py)" as described in parent issue #1.

We need a micado.py to place in https://github.com/astronomyk/PyReduce/tree/master/pyreduce/instruments . The draft for this file is https://github.com/astronomyk/PyReduce/blob/master/MICADO_info/micado.py

The main thing micado.py needs to do is to convert header values that cannot be mapped one-to-one. We can do that as soon as we have mapped all the header keywords that can be mapped directly. An initial draft for these keywords are in https://github.com/astronomyk/PyReduce/blob/master/MICADO_info/micado.json and needs to be placed in the above directory as well.

gijsverdoeskleijn commented 3 years ago

Thanks @hugobuddel. Small check: did you make @nadsabha and @wkausch aware that they can start from https://github.com/astronomyk/PyReduce/blob/master/MICADO_info/micado.json and where to put it?

nadsabha commented 3 years ago

Hi @hugobuddel, do you already have a new version of micado.py (the instrument class) that you could push to the MICADO_info folder? I committed the most recent version of micado.json that @wkausch uploaded to google drive. Thanks!

hugobuddel commented 3 years ago

No I don't have one yet. micado.py contains things like header translations that cannot be done by a simple substitution in micado.json. My plan was to see what PyReduce complains about and fix those.

I guess we now should have all the files available to run PyReduce and see what breaks? As in, can I just run micado_example.py on the files on Google drive?

nadsabha commented 3 years ago

I see. These files are still in my local installation. I am following Method 1 to get the needed settings for running MICADO files (e.g. right now it is taking a long time and detecting various clusters that do not make sense). I will update the files fully in the next hours.

Also, I had to change a line in the PyReduce code itself (reduce.py) concerning the error raised when not finding the optional bpm_mask file. I will contact that to Ansgar so he can change it in his code, otherwise anyone who attempts to run PyReduce without the mask will run into this error. Of course I could share my version of the file if that's not updated fast enough.