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

Sim catalog #803

Open
wants to merge 6 commits into
base: toast3
Choose a base branch
from
Open

Sim catalog #803

wants to merge 6 commits into from

Conversation

keskitalo
Copy link
Member

Generalization of the SO point source simulation module with an important bugfix for HWP-modulated cases.

@keskitalo keskitalo requested a review from tskisner January 7, 2025 01:24
Copy link
Member

@tskisner tskisner left a comment

Choose a reason for hiding this comment

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

Some minor things, mostly just stale debugging and copy/paste reference to Az/El in the comments.

@@ -1013,6 +1014,9 @@ def attempt_scan(
break
if success:
break
if t is None:
import pdb
pdb.set_trace()
Copy link
Member

Choose a reason for hiding this comment

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

Did you intend to leave this debugger call here (rather than raising an exception, etc)?

Comment on lines +5 to +9
# This operator is based on a Simons Observatory source file,
# https://github.com/simonsobs/sotodlib/blob/master/sotodlib/toast/ops/sim_catalog.py

# Copyright (c) 2018-2024 Simons Observatory.
# Full license can be found in the top level "LICENSE" file.
Copy link
Member

Choose a reason for hiding this comment

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

Since you were the original author of that code, I would remove these lines.


self.detector_pointing.apply(obs_data, detectors=[det])
try:
det_quat = obs_data.obs[0].detdata[self.detector_pointing.quats][det]
Copy link
Member

Choose a reason for hiding this comment

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

You could also just do obs.detdata[...].

Comment on lines +387 to +389
import pdb

pdb.set_trace()
Copy link
Member

Choose a reason for hiding this comment

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

Maybe log an error and re-raise the exception here?

detector_pointing = Instance(
klass=Operator,
allow_none=True,
help="Operator that translates boresight Az/El pointing into detector frame",
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be Ra/Dec frame?


pdb.set_trace()

# Convert Az/El quaternion of the detector into angles
Copy link
Member

Choose a reason for hiding this comment

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

Hopefully these are Ra/Dec quaternions...

Comment on lines +500 to +502
import pdb

pdb.set_trace()
Copy link
Member

Choose a reason for hiding this comment

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

More debugging things to remove

)

outfile = os.path.join(self.outdir, "map.png")
fig.savefig(outfile)
Copy link
Member

Choose a reason for hiding this comment

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

Having a visual check is great. If the sources were bright enough we might even be able to look at the relevant pixel closest to the source and confirm the map value is close to expected.

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