diff --git a/1542.mosaic_pipeline.rst b/1542.mosaic_pipeline.rst new file mode 100644 index 000000000..2fc68647d --- /dev/null +++ b/1542.mosaic_pipeline.rst @@ -0,0 +1 @@ +Change the default suffix for mosaic products from _i2d to _coadd diff --git a/changes/1542.mosaic_pipeline.rst b/changes/1542.mosaic_pipeline.rst new file mode 100644 index 000000000..2fc68647d --- /dev/null +++ b/changes/1542.mosaic_pipeline.rst @@ -0,0 +1 @@ +Change the default suffix for mosaic products from _i2d to _coadd diff --git a/romancal/associations/skycell_asn.py b/romancal/associations/skycell_asn.py index 0502bf369..b323d2b06 100644 --- a/romancal/associations/skycell_asn.py +++ b/romancal/associations/skycell_asn.py @@ -62,7 +62,6 @@ def skycell_asn(self): root_asn_name = self.parsed.output_file_root product_type = self.parsed.product_type product_release = self.parsed.release_product - suffix = "coadd" sep = "_" product_name_mapping = { @@ -92,8 +91,6 @@ def skycell_asn(self): + patch_name + sep + filter_id - + sep - + suffix ) with open(asn_file_name + "_asn.json", "w") as outfile: diff --git a/romancal/outlier_detection/_fileio.py b/romancal/outlier_detection/_fileio.py index 0b6fdc857..e411d20d6 100644 --- a/romancal/outlier_detection/_fileio.py +++ b/romancal/outlier_detection/_fileio.py @@ -13,7 +13,7 @@ def save_median(example_model, median_data, median_wcs, make_output_path): def save_drizzled(drizzled_model, make_output_path): - _save_intermediate_output(drizzled_model, "outlier_i2d", make_output_path) + _save_intermediate_output(drizzled_model, "outlier_coadd", make_output_path) def _make_median_model(example_model, data, wcs): diff --git a/romancal/pipeline/mosaic_pipeline.py b/romancal/pipeline/mosaic_pipeline.py index 0276225fe..8b31408a7 100644 --- a/romancal/pipeline/mosaic_pipeline.py +++ b/romancal/pipeline/mosaic_pipeline.py @@ -100,7 +100,7 @@ def process(self, input): if skycell_name in skycell_record["name"]: # skycell name are in the form of r270dm90x99y99 # example of product name "r0099101001001001001_F158_visit_r270dm90x99y99" - skycell_file_name = product_name + "_i2d.asdf" + skycell_file_name = product_name + "_coadd.asdf" # check to see if there exists a skycell on disk if not create it if not isfile(skycell_file_name): @@ -129,7 +129,7 @@ def process(self, input): self.resample.output_shape, ) wcs_file = asdf.open(self.resample.output_wcs) - self.suffix = "i2d" + self.suffix = "coadd" self.output_file = input.asn["products"][0]["name"] result = self.resample.run(result) self.sourcecatalog.output_file = self.output_file @@ -139,12 +139,12 @@ def process(self, input): exit(0) else: - self.resample.suffix = "i2d" + self.resample.suffix = "coadd" self.output_file = input.asn["products"][0]["name"] result = self.resample.run(result) self.sourcecatalog.output_file = self.output_file result_catalog = self.sourcecatalog.run(result) # noqa: F841 - self.suffix = "i2d" + self.suffix = "coadd" if input_filename: result.meta.filename = self.output_file diff --git a/romancal/regtest/test_catalog.py b/romancal/regtest/test_catalog.py index 8f525fd4e..ad1439a8e 100644 --- a/romancal/regtest/test_catalog.py +++ b/romancal/regtest/test_catalog.py @@ -12,8 +12,8 @@ @pytest.fixture( scope="module", params=[ - "r0099101001001001001_r274dp63x31y81_prompt_F158_i2d.asdf", - "r0099101001001001001_F158_visit_i2d.asdf", + "r0099101001001001001_r274dp63x31y81_prompt_F158_coadd.asdf", + "r0099101001001001001_F158_visit_coadd.asdf", "r0000101001001001001_0001_wfi01_cal.asdf", ], ids=["L3", "L2", "L3skycell"], diff --git a/romancal/regtest/test_mos_pipeline.py b/romancal/regtest/test_mos_pipeline.py index 1e22438ac..cf799812b 100644 --- a/romancal/regtest/test_mos_pipeline.py +++ b/romancal/regtest/test_mos_pipeline.py @@ -20,7 +20,7 @@ def run_mos(rtdata_module): rtdata.get_asn("WFI/image/L3_regtest_asn.json") # Test Pipeline - output = "r0099101001001001001_F158_visit_i2d.asdf" + output = "r0099101001001001001_F158_visit_coadd.asdf" rtdata.output = output args = [ diff --git a/romancal/regtest/test_mos_skycell_pipeline.py b/romancal/regtest/test_mos_skycell_pipeline.py index b2659ce8f..ce5953d96 100644 --- a/romancal/regtest/test_mos_skycell_pipeline.py +++ b/romancal/regtest/test_mos_skycell_pipeline.py @@ -15,7 +15,7 @@ def run_mos(rtdata_module): # Test Pipeline rtdata.get_asn("WFI/image/L3_mosaic_asn.json") - output = "r0099101001001001001_r274dp63x31y81_prompt_F158_i2d.asdf" + output = "r0099101001001001001_r274dp63x31y81_prompt_F158_coadd.asdf" rtdata.output = output args = [ "roman_mos", diff --git a/romancal/resample/resample.py b/romancal/resample/resample.py index 56a6332bc..aa01c1b11 100644 --- a/romancal/resample/resample.py +++ b/romancal/resample/resample.py @@ -238,7 +238,7 @@ def resample_group(self, input_models, indices): output_root = "_".join( example_image.meta.filename.replace(output_type, "").split("_")[:-1] ) - output_model.meta.filename = f"{output_root}_outlier_i2d{output_type}" + output_model.meta.filename = f"{output_root}_outlier_coadd{output_type}" input_models.shelve(example_image, indices[0], modify=False) output_model.meta.basic.location_name = self.location_name del example_image @@ -315,7 +315,7 @@ def resample_many_to_many(self): if not self.in_memory: # build ModelLibrary as an association from the output files # this saves memory if there are multiple groups - asn = asn_from_list(output_models, product_name="outlier_i2d") + asn = asn_from_list(output_models, product_name="outlier_coadd") asn_dict = json.loads( asn.dump()[1] ) # serializes the asn and converts to dict diff --git a/romancal/scripts/make_regtestdata.sh b/romancal/scripts/make_regtestdata.sh index f3e97d542..dcf2afc3b 100644 --- a/romancal/scripts/make_regtestdata.sh +++ b/romancal/scripts/make_regtestdata.sh @@ -183,11 +183,11 @@ l3name="r0099101001001001001_F158_visit" asn_from_list r0000101001001001001_0001_wfi01_cal.asdf r0000101001001001001_0002_wfi01_cal.asdf r0000101001001001001_0003_wfi01_cal.asdf -o L3_regtest_asn.json --product-name $l3name strun roman_mos L3_regtest_asn.json cp L3_regtest_asn.json $outdir/roman-pipeline/dev/WFI/image/ -cp ${l3name}_i2d.asdf $outdir/roman-pipeline/dev/WFI/image/ -cp ${l3name}_i2d.asdf $outdir/roman-pipeline/dev/truth/WFI/image/ +cp ${l3name}_coadd.asdf $outdir/roman-pipeline/dev/WFI/image/ +cp ${l3name}_coadd.asdf $outdir/roman-pipeline/dev/truth/WFI/image/ # L3 catalog -strun romancal.step.SourceCatalogStep ${l3name}_i2d.asdf +strun romancal.step.SourceCatalogStep ${l3name}_coadd.asdf cp ${l3name}_cat.asdf $outdir/roman-pipeline/dev/truth/WFI/image/ @@ -195,11 +195,11 @@ l3name="r0099101001001001001_r274dp63x31y81_prompt_F158" asn_from_list r0000101001001001001_0001_wfi01_cal.asdf r0000101001001001001_0002_wfi01_cal.asdf r0000101001001001001_0003_wfi01_cal.asdf -o L3_mosaic_asn.json --product-name $l3name --target r274dp63x31y81 strun roman_mos L3_mosaic_asn.json cp L3_mosaic_asn.json $outdir/roman-pipeline/dev/WFI/image/ -cp ${l3name}_i2d.asdf $outdir/roman-pipeline/dev/WFI/image/ -cp ${l3name}_i2d.asdf $outdir/roman-pipeline/dev/truth/WFI/image/ +cp ${l3name}_coadd.asdf $outdir/roman-pipeline/dev/WFI/image/ +cp ${l3name}_coadd.asdf $outdir/roman-pipeline/dev/truth/WFI/image/ # L3 catalog -strun romancal.step.SourceCatalogStep ${l3name}_i2d.asdf +strun romancal.step.SourceCatalogStep ${l3name}_coadd.asdf cp ${l3name}_cat.asdf $outdir/roman-pipeline/dev/truth/WFI/image/ # L2 catalog @@ -210,14 +210,14 @@ cp r0000101001001001001_0001_wfi01_cat.asdf $outdir/roman-pipeline/dev/truth/WFI l3name="r0099101001001001001_r274dp63x31y81_prompt_F158" asn_from_list --product-name=$l3name r0000101001001001001_0001_wfi01_cal.asdf r0000101001001001001_0002_wfi01_cal.asdf r0000101001001001001_0003_wfi01_cal.asdf -o L3_m1_asn.json strun roman_mos L3_m1_asn.json -cp ${l3name}_i2d.asdf $outdir/roman-pipeline/dev/truth/WFI/image/ +cp ${l3name}_coadd.asdf $outdir/roman-pipeline/dev/truth/WFI/image/ # L3 skycell catalog -strun romancal.step.SourceCatalogStep ${l3name}_i2d.asdf +strun romancal.step.SourceCatalogStep ${l3name}_coadd.asdf cp ${l3name}_cat.asdf $outdir/roman-pipeline/dev/truth/WFI/image/ # multiband catalog -asn_from_list --product-name=${l3name}_mbcat ${l3name}_i2d.asdf -o L3_skycell_mbcat_asn.json +asn_from_list --product-name=${l3name}_mbcat ${l3name}_coadd.asdf -o L3_skycell_mbcat_asn.json strun romancal.step.MultibandCatalogStep L3_skycell_mbcat_asn.json --deblend True # tests passing suffix to the pipeline