Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation map metadata is not getting propagated from L2 file #1389

Closed
schlafly opened this issue Aug 27, 2024 · 0 comments · Fixed by #1391
Closed

Segmentation map metadata is not getting propagated from L2 file #1389

schlafly opened this issue Aug 27, 2024 · 0 comments · Fixed by #1391

Comments

@schlafly
Copy link
Collaborator

The following lines make a default segmentation map metadata and don't bring in any of the metadata from the L2 file. We need to copy over the relevant L2 metadata into the segmentation metadata. The source catalog metadata I think does have the right bits, so this might look something like segmentation_model.meta = source_catalog_model.meta.

segmentation_model = maker_utils.mk_datamodel(
datamodels.MosaicSegmentationMapModel
)
if segment_img is not None:
segmentation_model.data = segment_img.data.astype(np.uint32)
self.save_model(
segmentation_model,
output_file=output_filename,
suffix="segm",
force=True,
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant