emsellem / pymusepipe

MIT License
9 stars 9 forks source link

Code crashes due to minor bugs related to recent update. #21

Closed jusneuma closed 1 year ago

jusneuma commented 1 year ago

I noticed two places where the code crashes probably related to an update ~3 weeks ago.

First:

>>> phangs1 = MusePipeSample(dict_sample1, rc_filename=rcfile, cal_filename=calfile, musemode=musemode1,
...                         filter_for_alignment=filter_for_alignment, filter_list=filter_list)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jneumann/pymusepipe/src/pymusepipe/target_sample.py", line 231, in __init__
    self._init_targets(**kwargs)
  File "/home/jneumann/pymusepipe/src/pymusepipe/target_sample.py", line 335, in _init_targets
    init_comb_target = MusePointings(targetname=targetname,
  File "/home/jneumann/pymusepipe/src/pymusepipe/combine.py", line 239, in __init__
    self.goto_origfolder()
  File "/home/jneumann/pymusepipe/src/pymusepipe/combine.py", line 646, in goto_origfolder
    self.goto_folder(self.paths.orig, addtolog=addtolog, verbose=False)
TypeError: MusePointings.goto_folder() got an unexpected keyword argument 'verbose'

Proposed fix: Remove verbose=False in line 646 and 658 of combine.py

Second:

>>> phangs.finalise_reduction(targetname=targetname, name_offset_table=tabref,
...         folder_offset_table=foldtab, pointing_table=pt,
...         rot_pixtab=False, create_pixtables=False, create_wcs=True,
...         create_expocubes=True, create_pointingcubes=True) 
 MusePipeInfo =========== CREATION OF WCS MASKS ==============
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jneumann/pymusepipe/src/pymusepipe/target_sample.py", line 640, in finalise_reduction
    self.create_reference_wcs(targetname=targetname,
  File "/home/jneumann/pymusepipe/src/pymusepipe/target_sample.py", line 1166, in create_reference_wcs
    self.init_combine(targetname=targetname, **kwargs)
  File "/home/jneumann/pymusepipe/src/pymusepipe/target_sample.py", line 1135, in init_combine
    self.pipes_combine[targetname] = MusePointings(targetname=targetname,
  File "/home/jneumann/pymusepipe/src/pymusepipe/combine.py", line 183, in __init__
    PipeRecipes.__init__(self, **kwargs)
TypeError: PipeRecipes.__init__() got an unexpected keyword argument 'folder_ref_wcs'

Finalise reduction breaks in wcs mask routine. Recent update includes changes of some lines regarding the keyword folder_ref_wcs.

emsellem commented 1 year ago

First bug is fixed. I removed all verbose instances actually as it is not used at all. Possibly a remnant of an old code.

emsellem commented 1 year ago

Second bug hopefully solved. Misprint on the keyword indeed. Folder_ref_wcs all now folder_refcube