emsellem / pymusepipe

MIT License
9 stars 9 forks source link

Bug: AttributeError: 'MusePointings' object has no attribute '_check_pointings_list' #8

Closed cloud182 closed 1 year ago

cloud182 commented 1 year ago

Hi,

I think I found another bug. I am still running finalise_reduction(). You can find the error report here.

File /data/beegfs/astro-storage/groups/schinnerer/congiu/python/pymusepipe/src/pymusepipe/target_sample.py:703, in MusePipeSample.finalise_reduction(self, targetname, rot_pixtab, create_wcs, create_expocubes, create_pixtables, create_pointingcubes, name_offset_table, folder_offset_table, dict_exposures, list_datasets, **kwargs)
    700     default_comb_folder = self.targets[targetname].combcubes_path
    701     folder_full_ref_wcs = kwargs.pop("folder_full_ref_wcs",
    702                                      default_comb_folder)
--> 703     self.create_reference_wcs(targetname=targetname,
    704                               folder_offset_table=folder_offset_table,
    705                               name_offset_table=name_offset_table,
    706                               dict_exposures=dict_exposures,
    707                               reference_cube=reference_cube,
    708                               refcube_name=refcube_name,
    709                               mosaic_wcs=mosaic_wcs,
    710                               pointings_wcs=pointings_wcs,
    711                               list_datasets=list_datasets,
    712                               ref_wcs=full_ref_wcs,
    713                               folder_ref_wcs=folder_full_ref_wcs,
    714                               fakemode=False)
    716 if create_expocubes:
    717     # Running the individual cubes now with the same WCS reference
    718     upipe.print_info("=========== CREATION OF EXPO CUBES =============")

File /data/beegfs/astro-storage/groups/schinnerer/congiu/python/pymusepipe/src/pymusepipe/target_sample.py:1299, in MusePipeSample.create_reference_wcs(self, targetname, pointings_wcs, mosaic_wcs, reference_cube, ref_wcs, refcube_name, **kwargs)
   1297 folder_ref_wcs = kwargs.pop("folder_ref_wcs", default_comb_folder)
   1298 self.init_combine(targetname=targetname, **kwargs)
-> 1299 self.pipes_combine[targetname].create_reference_wcs(
   1300     pointings_wcs=pointings_wcs,
   1301     mosaic_wcs=mosaic_wcs,
   1302     reference_cube=reference_cube,
   1303     refcube_name=refcube_name,
   1304     ref_wcs=ref_wcs,
   1305     folder_ref_wcs=folder_ref_wcs,
   1306     **kwargs,
   1307 )

File /data/beegfs/astro-storage/groups/schinnerer/congiu/python/pymusepipe/src/pymusepipe/combine.py:735, in MusePointings.create_reference_wcs(self, pointings_wcs, mosaic_wcs, reference_cube, refcube_name, **kwargs)
    732 if refcube_name is None:
    733     upipe.print_info("@@@@@@@ First creating a reference (mosaic) "
    734                      "cube with short spectral range @@@@@@@")
--> 735     self.run_combine(lambdaminmax=lambdaminmax_for_wcs,
    736                      filter_list="white",
    737                      prefix_all=default_prefix_wcs,
    738                      targetname_asprefix=False)
    739     wcs_refcube_name = self._combined_cube_name
    740 else:

File /data/beegfs/astro-storage/groups/schinnerer/congiu/python/pymusepipe/src/pymusepipe/combine.py:1111, in MusePointings.run_combine(self, sof_filename, lambdaminmax, list_pointings, suffix, **kwargs)
   1108 self.goto_folder(self.paths.data, addtolog=True)
   1110 # If list_pointings is None using the initially set up one
-> 1111 list_pointings = self._check_pointings_list(list_pointings, self.list_pointings)
   1113 # If only 1 exposure, duplicate the pixtable
   1114 # as exp_combine needs at least 2 pixtables
   1115 nexpo_tocombine = sum(len(self.dict_pixtabs_in_pointings[pointing])
   1116                       for pointing in list_pointings)

AttributeError: 'MusePointings' object has no attribute '_check_pointings_list'

Unfortunately, I have no suggestion on how to solve it since I was not able to find the definition of something similar to _check_pointings_list anywhere. The only similar thing I found is _check_list_datasets, but I am not sure if this is the function that it is supposed to go here.

EDIT: If I replace _check_pointings_list with _check_list_datasets, the next line produces an error, so I guess this is not the correct thing to do.

emsellem commented 1 year ago

Fixed by updating the combine and functions