Lucero (published as ipynb-jjsm-tools) is the utility package I use in every notebook. Most of it started as code from homework and lab assignments at UC, especially the observational astronomy courses, that I kept copying from one notebook to the next until it became a package. It helps me set a standard style across notebooks and plots.
pip install "ipynb-jjsm-tools[full] @ git+https://github.com/jj-sm/ipynb-jjsm-tools.git"
The extras are notebook (Jupyter), lab (astronomy tooling) and full (both). It is usually imported as lab:
import ipynb_jjsm_tools as lab
Modules
setup: set the project root and create the usual folders, activate or install LaTeX, and size figures in centimetres (cm_to_in,size,set_font_sizes) so plots match the report’s fonts.download:S3Client, to load data from S3-compatible storage with credentials from a.envfile or Colab secrets.photometry: apertures, aperture flux and instrumental magnitudes; zero-point calibration withcompute_zeropointandplot_zeropoint_fit; andscan_aperture_radiiwithplot_radius_optimizationto pick the best aperture.plot:- FITS images with WCS axes (
plot_image). - Color–magnitude and HR diagrams with isochrone overlays, plus
shift_isochroneto apply distance modulus, extinction and reddening in one call. - Star profiles with Gaussian fits (
plot_star_profile). - A scatter + fit + residuals panel (
scatter_with_fit).
- FITS images with WCS axes (
- CLI:
jjsm-setupinstalls LaTeX and can create a uv virtual environment.
It is also the default toolkit on the lab server: astrolab-setup installs it in the ~/.ipynb environment that astroenvs uses as its Jupyter kernel.