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

DM-35115: Add bulge_flux_fraction column to source injection schema #691

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jmeyers314
Copy link
Contributor

No description provided.

Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

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

Quick comment about log message conventions: (1) f-strings should not be used in debug log messages (I didn't comment on every place) (2) some of your logs are missing the %s.

@@ -79,7 +79,7 @@ def _add_fake_sources(exposure, objects, calibFluxRadius=12.0, logger=None):
posd = galsim.PositionD(pt.x, pt.y)
posi = galsim.PositionI(pt.x//1, pt.y//1)
if logger:
logger.debug(f"Adding fake source at {pt}")
logger.debug(f"Adding fake source {gsObj} at {pt}")
Copy link
Member

Choose a reason for hiding this comment

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

I know there is some debate over f-strings in warning and info level messages but for debug we should be using deferred stringifcation so that the final string is only formed if the debug message is going to be issued.

@@ -747,6 +762,8 @@ def add_to_replace_dict(new_name, depr_name, std_name):
cfg.sourceSelectionColName,
'select'
)
if replace_dict:
self.log.debug("Replacing columns:", replace_dict)
Copy link
Member

Choose a reason for hiding this comment

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

This should be:

self.log.debug("Replacing columns: %s", replace_dict)

copy=False
)
if replace_dict:
self.log.debug("Replacing columns:", replace_dict)
Copy link
Member

Choose a reason for hiding this comment

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

Same as above. The log message should include the %s.

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