Skip to content

Selecting specific datasets in finalise_reduction #22

@cloud182

Description

@cloud182

Hi Eric,

I am trying to process a few OBs from NGC 253 (18 and 51) and I am in the finalise reduction step. Since everything else is fine I would like to limit the processing to just the OB I am interested in, in order to save time. To do so, I modified the dictionary that selects the OB as following:

training_dict_PHANGS_sample = {
       'NGC0253': ['PHANGS_EXT', {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0,
                                 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 1, 19: 0, 20: 0, 21: 0,
                                 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 0, 29: 0, 30: 0, 31: 0,
                                 32: 0, 33: 0, 34: 0, 35: 0, 36: 0, 37: 0, 38: 0, 39: 0, 40: 0, 41: 0,
                                 42: 0, 43: 0, 44: 0, 45: 0, 46: 0, 47: 0, 48: 0, 49: 0, 50: 0, 51: 1,
                                 998: 0, 999: 0}]
       }

and, I run finalise_reduction like this (all the paths and reference wcs should be correctly set):

phangs.finalise_reduction(targetname='NGC0253', name_offset_table=final_offset_table,
                          folder_offset_table=folder_offset_table,
                          pointing_table=pt, list_datasets=[18, 51],
                          rot_pixtab=True, create_pixtables=True, create_wcs=True,
                          create_expocubes=True, create_pointingcubes=True,
                          wcs_refcube_name=wcs_refcube_name)

However, as soon as I run the function I get the following error:

Galaxies in the PHANGS sample ---
Target 001: NGC0253   
=================================
# MusePipeInfo Scanning folder /data/beegfs/astro-storage/groups/schinnerer/PHANGS/MUSE/live/Data/PHANGS_EXT/NGC0253/Alignment/
# MusePipeInfo Building the filename table from the list of 438 files
# MusePipeInfo Found 438 files from input filename list
# MusePipeInfo Getting centres for the set of 438 files
# MusePipeInfo Assigning Pointings ---
# MusePipeInfo ========== ROTATION OF PIXTABLES ===============
# MusePipeInfo ---- Starting the PIXTABLE ROTATION for Target=NGC0253 ----
# MusePipeInfo Rotation =-0.5949395971323785 Deg for Dataset=  1, TPLS=2021-11-27T03:07:22 - Expo 01
Traceback (most recent call last):
  File "/data/beegfs/astro-storage/groups/schinnerer/PHANGS/MUSE/old/Test/Config_test_NGC253/v0/run_reduction_51.py", line 53, in <module>
    phangs.finalise_reduction(targetname='NGC0253', name_offset_table=final_offset_table,
  File "/data/beegfs/astro-storage/groups/schinnerer/congiu/python/pymusepipe/src/pymusepipe/target_sample.py", line 598, in finalise_reduction
    self.rotate_pixtables_target(targetname=targetname,
  File "/data/beegfs/astro-storage/groups/schinnerer/congiu/python/pymusepipe/src/pymusepipe/target_sample.py", line 913, in rotate_pixtables_target
    folder_expos = self._get_path_files(targetname, dataset)
  File "/data/beegfs/astro-storage/groups/schinnerer/congiu/python/pymusepipe/src/pymusepipe/target_sample.py", line 519, in _get_path_files
    return self.pipes[targetname][dataset]._get_path_files(expotype)
KeyError: 1

It seems like the code does not like that I am trying to select only a couple of OBs. Is this the expected behaviour, or is it a bug?

Cheers and thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions