Skip to content

Conversation

@earosenberg
Copy link
Contributor

Significant changes and updates to the bundling code. Main changes:

  • Atomic db is now required only when creating the bundle db. Coaddition depends on bundle db only; atomic_db is no longer a valid argument. Instead, a new table atomic has been added to the bundle db; this contains columns obs_id wafer freq_channel split_label median_weight_qu basename for every atomic map that exists and passes selection criteria (query_restrict, atomic_list). Maps for coaddition are taken from this table instead of making a new query.
  • atomic_list is now applied to the bundle db, so only wafer/obs in the list will be included in the db. This will change median values for inter-obs splits when atomic_list is used. atomic_list can still be passed as an argument to the Coadder to further restrict what is coadded if desired.
  • Substantial code simplification to the Coordinator class by using pandas.DataFrame instead of raw numpy arrays. Bundles are still assigned randomly per-obs with number obs/bundle forced to be equal; however the bundle assignment will be different for the same seed relative to old code.
  • Because it can no longer be inferred from the atomic_db, map_dir has been changed from an optional to required argument in all functions.
  • Docstring fixes, updates, etc

@earosenberg earosenberg marked this pull request as draft January 16, 2026 15:08
@earosenberg
Copy link
Contributor Author

Switched back to draft as I want to simplify the Coadder too, using the new improvements to the Coordinator.

@earosenberg earosenberg requested a review from kwolz February 4, 2026 15:54
@earosenberg earosenberg marked this pull request as ready for review February 4, 2026 15:54
@earosenberg
Copy link
Contributor Author

After testing with an ISO like config this seems to be working for bundling and sign-flip. Have not tested with filtering looking through coadd_filtered_sims.py I don't think it should break.
Given the scale of changes would appreciate a review (eg @kwolz @adrien-laposta @susannaaz) before merging. Any help with further testing would also be welcome.

@kwolz
Copy link
Collaborator

kwolz commented Feb 4, 2026

Happy to review and test this branch on v4 sim filtering and coadding.

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