Skip to content

v0.6.0#8

Merged
NCastro-Segura merged 44 commits into
mainfrom
dev
Mar 20, 2026
Merged

v0.6.0#8
NCastro-Segura merged 44 commits into
mainfrom
dev

Conversation

@zairving

Copy link
Copy Markdown
Collaborator

Finishing touches for v0.6.0.

  • Updated Read the Docs Python version to 3.14
  • Added missing links to a number of docstrings
  • Fixed some formatting issues in some notebooks
  • Added a new safeguard to prevent a Reducer from being instantiated if the specified out_directory already contains a reduction_parameters.json file that does not match the Reducer instance

@zairving zairving added the documentation Improvements or additions to documentation label Jan 31, 2026
@zairving zairving added the enhancement New feature or request label Feb 5, 2026
@zairving

Copy link
Copy Markdown
Collaborator Author

This PR got a bit larger than expected. Summary of changes:

  • Various documentation/docstring improvements.
  • Added a dedicated timing module to hold timing routines (e.g., applying barycentric time corrections and bespoke routines for operating on astropy.timeseries.TimeSeries instances).
  • Improved reduction parameter logging and added safeguards to prevent multiple Reducer instances using the same output directory but using different reduction parameters.
  • Added calibration terms to Reducer.plot_noise() and S/N calculations.
  • Image grouping now uses camera AND filter information - prevents issues with instruments using multiple cameras with the same filters.
  • Forced photometry now works as intended. Previously, source coordinates were not being transformed correctly.
  • Removed requirement for data files to contain a fit extension. Now all files in the specified data directory are assumed to be FITS files, regardless of extension. Files that cannot be opened using astropy.io.fits.open() (i.e., non-FITS files) are ignored.
  • Analyzer.rebin() now works as intended. Specifically, all light curves are rebinned using a common reference time (to maintain simultaneity), and gaps are not padded with zeros.
  • Updated pixel-scale for MEXMAN instrument.

@NCastro-Segura NCastro-Segura left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey, thanks for putting this together! The PR description undersells it a bit — there are some genuinely important fixes buried in here alongside the docs work, so good to see them land.

A few things I wanted to flag:

Forced photometry fix — this one's subtle but critical. The catalog coordinates weren't going through the per-image affine transform, so results were effectively pinned to the reference frame regardless of the actual image offset. The fix looks correct. One thing worth considering: users who ran forced photometry with earlier versions will have silently wrong light curves. Might be worth a note in the changelog so they know to rerun their reductions.

Image grouping by camera + filter — good catch. Grouping by filter alone was always going to be a problem for a multi-camera instrument where all three cameras can share the same filter name. The camera_and_filter_key() approach is clean and consistent with how the rest of the code handles this.

rebin() simultaneity and gap handling — both fixes make sense. Using t_ref as the common time_bin_start across all keys is the right call for multi-band work where you need the time grids to align. And removing gap bins via GTIs rather than padding with zeros is the scientifically correct behaviour. One minor suggestion: it'd be worth calling out the simultaneity guarantee explicitly in the rebin() docstring — it's a non-obvious property that users doing multi-band differential photometry will care about.

FITS file discovery — pragmatic change, I like it. One small thing: glob('*') will also match subdirectories, and fits.open() on a directory throws an exception that gets caught and emits a warning. It won't break anything, but the warning message will be confusing. A .is_file() check before attempting to open would clean that up.

Reducer parameter safeguard — solid addition. The json.dumps comparison works fine for now, though it's worth keeping in mind that if floating-point parameters get added in the future, formatting differences could theoretically cause false positives.

MEXMAN pixel scale — glad this got corrected. Was this from an updated instrument spec or measured on-sky?

ReadTheDocs Python 3.14 — just double-checking: is 3.14 available yet on the ubuntu-22.04 RTD image? It was still prerelease last I checked. Worth verifying the docs build doesn't break after merge.

Nothing here is a blocker. Happy to approve once you've had a chance to look at the .is_file() suggestion and the changelog note for the forced photometry fix.

@zairving

Copy link
Copy Markdown
Collaborator Author

Cheers, @NCastro-Segura!

I've implemented your suggestions for FITS file discovery and the rebin() docstring. I've also added a few small changes I've made since opening this PR.

The MEXMAN pixel scale came from observers at OAN-SPM.

I don't think there are any issues with Python 3.14 support any more. Indeed, the dev page of the docs appears to work perfectly: https://opticam.readthedocs.io/en/dev/

@NCastro-Segura NCastro-Segura merged commit b0204a9 into main Mar 20, 2026
1 check passed
@NCastro-Segura NCastro-Segura deleted the dev branch March 20, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants