WS-1769 VLA manifest creation
1 unresolved thread
1 unresolved thread
This sets any *pbcor.tt0.fits images to be the science products and assigns similarly named images as ancillaries to them. If no science product with a similar name exists for an image, it'll be assigned as an ancillary to the first one to not leave any images behind.
Merge request reports
Activity
assigned to @dnemergu
Here's an output example (added some junk data to check edge cases):
{ "parameters": { "telescope": "EVLA", "reingest": "false", "ngas_ingest": "true", "ingestion_path": "/lustre/aoc/cluster/pipeline/docker/workspaces/staging/tmp4dbkvftp", "calibrate": "false", "additional_metadata": "./aux_image_metadata.json" }, "input_group": { "science_products": [ { "locator": "" } ] }, "output_group": { "science_products": [ { "type": "fits_image", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.K_band.cont.I.pbcor.tt0.fits", "ancillary_products": [ { "type": "spectral_index", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.K_band.cont.I.alpha.error.fits" }, { "type": "spectral_index", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.K_band.cont.I.alpha.fits" }, { "type": "clean_mask", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.K_band.cont.I.mask.fits" }, { "type": "primary_beam", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.K_band.cont.I.pb.tt0.fits" }, { "type": "fits_image", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.K_band.cont.I.tt0.fits" }, { "type": "fits_image", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.K_band.cont.I.tt1.fits" }, { "type": "spectral_index", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.Q_band.cont.I.alpha.error.fits" } ] }, { "type": "fits_image", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.P_band.cont.I.pbcor.tt0.fits" }, { "type": "fits_image", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.X_band.cont.I.pbcor.tt0.fits", "ancillary_products": [ { "type": "spectral_index", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.X_band.cont.I.alpha.error.fits" }, { "type": "spectral_index", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.X_band.cont.I.alpha.fits" }, { "type": "clean_mask", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.X_band.cont.I.mask.fits" }, { "type": "primary_beam", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.X_band.cont.I.pb.tt0.fits" }, { "type": "fits_image", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.X_band.cont.I.tt0.fits" }, { "type": "fits_image", "filename": "16B-069.MJD57713.51329133102.J1522+3934_sci.X_band.cont.I.tt1.fits" } ] } ], "ancillary_products": [ { "type": "pipeline_weblog", "filename": "weblog.tgz" }, { "type": "pipeline_artifacts", "filename": "pipeline_artifacts_2023_05_26T14_40_01.tar" }, { "type": "ingestion_artifacts", "filename": "ingestion_artifacts_2023_06_01T04_11_14.694.tar" } ] } }
mentioned in commit 8da83d3f
86 86 ] 87 87 self.logger.info(f"Science Product ancillaries are: {image_files}") 88 88 89 sp_aps = [] 89 # Build a mapping of science products -> ancillaries 90 sp_aps = {k: [] for k in sp_image_files} 90 91 for image_file in image_files: 91 92 sp_ap = self._build_ancillary_image_science_product(image_file) 92 sp_aps.append(sp_ap) 93 for sp in sp_aps.keys(): 94 if image_file.name.startswith(sp.name.split(PBCOR)[0]): 95 # Add this as an ancillary to a similarly named science product 96 sp_aps.get(sp).append(sp_ap) 97 break 98 elif sp == next(reversed(sp_aps.keys())):
Please register or sign in to reply