Skip to content

DM-54825: Add template mask columns to coadd_depth_table. - #495

Open
erinleighh wants to merge 2 commits into
mainfrom
tickets/DM-54825
Open

erinleighh wants to merge 2 commits into
mainfrom
tickets/DM-54825

Conversation

@erinleighh

Copy link
Copy Markdown
Contributor

No description provided.

rejected_flag = (mask_array & rejected) != 0
inexact_psf_flag = (mask_array & inexact_psf) != 0
intrp_flag = (mask_array & intrp) != 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the blank lines unless they're here for a purpose I'm missing. (And if you used an LLM to help with these code changes, please say so in the commit message.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do! No LLM on this one, mostly me wanting space to read things better (and fighting with lint/black). I'll clear out the blank lines!

)


class CoaddDepthSummaryTask(PipelineTask):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Genuinely surprised this wasn't caught in the initial ticket and I completely spaced on it twice. Thank you!

@@ -80,24 +89,107 @@
butlerQC.put(outputs, outputRefs)

def run(self, inputs):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add method documentation per https://developer.lsst.io/python/numpydoc.html#documenting-methods-and-functions

In particular, what is expected to exist in inputs ?

+ list(zip(*stats))
+ list(zip(*quantiles))
)
names = ["patch", "band", "mean", "median", "stdevs"] + threshold_col_names + quantile_col_names

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should stdev be singular here to match its friends in names?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, good catch. Thanks!!

n_image_table = Table(data=data, names=names, dtype=dtype)

# Combine tables.
combined_table = join(coadd_table, n_image_table, keys=["patch", "band"])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity I suggest importing the entirety of astropy.tables and explicitly calling this astropy.tables.join here, but it's not essential.

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 this pull request may close these issues.

2 participants