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

BUG fix galsim random seeding again #28

Merged
merged 5 commits into from
Mar 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ENH allow for missing truth data
beckermr committed Mar 27, 2024

Verified

This commit was signed with the committer’s verified signature.
pinheadmz Matthew Zipkin
commit c598977da3aeb4cdd1a3fcd7a4f1a533e6abe151
14 changes: 8 additions & 6 deletions montara/eastlake_step.py
Original file line number Diff line number Diff line change
@@ -414,12 +414,14 @@ def _write_truth(self, fnames, tilename, base_dir, stash, bands):

for band in bands:
mskb = data["band"] == band
assert np.any(mskb)
bdata = data[mskb]
inds = np.searchsorted(_pos_data["id"], bdata["id"])
assert np.array_equal(_pos_data["id"][inds], bdata["id"])
_pos_data[f"mag_{band}"][:] = np.nan
_pos_data[f"mag_{band}"][inds] = bdata["mag"]
if self.config["output"].get("n_se_test", None) is None:
assert np.any(mskb)
if np.any(mskb):
bdata = data[mskb]
inds = np.searchsorted(_pos_data["id"], bdata["id"])
assert np.array_equal(_pos_data["id"][inds], bdata["id"])
_pos_data[f"mag_{band}"][:] = np.nan
_pos_data[f"mag_{band}"][inds] = bdata["mag"]

# we'll stash this for later
truepos_filename = os.path.join(