Open
Conversation
b70600c to
8069d43
Compare
ppp-one
reviewed
Mar 24, 2026
| except Exception as e: | ||
| field_of_view = np.array([np.nan, np.nan]) | ||
| self.observatory.error( | ||
| self.observatory.logger.error( |
Upgrades astrafocus from 0.1.2 to 0.1.3, which fixes autofocus runs crashing with "Input must be a 2D array" when an exposure fails mid-sweep (e.g. due to weather); the new version catches focus measure exceptions and records NaN instead of aborting. Also adds documentation (docstring and FIELD_DESCRIPTIONS) clarifying when to prefer non-parametric operators (fft, normalized_variance) for coarse searches vs. analytic operators (HFR) for fine tuning near the focus peak.
…f view determination
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
name: Pull request
about: Create a pull request
Description
Improves the
Autofocuserclass with a sharedrun_timestampproperty so all output files from a single autofocus run share a consistent timestamp-based naming scheme. Also simplify the focus record handling to use only the in-memory record, and adds logging for the observatory subclass type at startup.Changes Made
run_timestampproperty toAutofocuserthat lazily generates a single timestamp (formatYYYYMMDD_HHMMSS) shared across all output files of one run_output_path()helper that builds consistent output paths usingrun_timestampmake_summary_plot()andsave_result()to use_output_path()instead of ad-hoc timestamp/CSV-derived filenamesmake_summary_plot()— the in-memoryfocus_recordis now the only source; failures emit warnings and return earlymake_summary_plot()using the shared timestampobservatory.py)self.observatory.error(...)→self.observatory.logger.error(...)callastrafocusdependency to0.1.2. This fixes a few small bugs that propagated into Astra, especially when using secondary focus measure operators.Checklist