Skip to content
Merged

Dev #16

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
1dbefdf
Merge pull request #3 from FarzanehZohrabi/gulls_dev
FarzanehZohrabi Mar 5, 2025
9723e8f
Merge pull request #4 from FarzanehZohrabi/gulls_dev
FarzanehZohrabi Mar 27, 2025
1c6cac5
Merge pull request #5 from FarzanehZohrabi/gulls_dev
mtpenny Jul 2, 2025
8fb2b33
Adding other OPT example
mtpenny Jul 2, 2025
a69b2f7
Changing static const double to static constexpr double
mtpenny Jul 2, 2025
4af4619
Adding v5.0 VBMicrolensing, improving ESPL.tbl test
mtpenny Jul 2, 2025
19a5aea
Merge pull request #6 from mtpenny/dev
mtpenny Jul 2, 2025
167c5ae
Typo in standardPlanet
mtpenny Jul 3, 2025
469f6f4
Merge pull request #1 from gulls-microlensing/dev
mtpenny Jul 3, 2025
7f8bca6
Merge pull request #7 from mtpenny/dev
mtpenny Jul 3, 2025
3f2a35f
Adding multiple lightcurve generator
mtpenny Jul 15, 2025
c10ce30
First attempts at multiple lenses, some minor fixes
mtpenny Aug 4, 2025
9d0c364
Makefile changes
mtpenny Aug 4, 2025
5df7085
Fixes murel_ref reporting error, enables variable column position in …
mtpenny Aug 12, 2025
ee2699f
Merge pull request #8 from FarzanehZohrabi/gulls_dev
mtpenny Aug 12, 2025
be3c757
Reworked parameter file reading, added support for binary sources
mtpenny Sep 18, 2025
3319399
Merge pull request #2 from gulls-microlensing/dev
mtpenny Sep 18, 2025
f341885
Merge pull request #9 from mtpenny/dev
mtpenny Sep 18, 2025
0bf292a
Fixed columns in lightcurve output when 2 sources
mtpenny Sep 19, 2025
f49bdf2
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
mtpenny Sep 19, 2025
4a10447
Merge branch 'gulls-microlensing:dev' into dev
mtpenny Sep 21, 2025
581af38
Merge pull request #10 from mtpenny/dev
mtpenny Sep 21, 2025
a808eec
Adds binary source parameters to output
mtpenny Sep 22, 2025
e8a2b4f
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
mtpenny Sep 22, 2025
6257cc8
Added plotlc2.py to handle multiple sources, will likely fold this in…
mtpenny Sep 22, 2025
da6e51c
Merge branch 'gulls-microlensing:dev' into dev
mtpenny Sep 22, 2025
0da27a0
Merge pull request #11 from mtpenny/dev
mtpenny Sep 22, 2025
de14bd6
Few fixes to ground based stuff
mtpenny Oct 7, 2025
91dd982
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
mtpenny Oct 7, 2025
8df926a
Added astrometry infrastructure
mtpenny Oct 7, 2025
1105436
Merge branch 'gulls-microlensing:dev' into dev
mtpenny Oct 7, 2025
830c41c
Merge pull request #13 from mtpenny/dev
mtpenny Oct 7, 2025
53908e4
Fixing sin->cos binarySource bug
mtpenny Oct 8, 2025
e2dd699
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
mtpenny Oct 8, 2025
5d61c08
Black hole planets.pl file added
mtpenny Oct 8, 2025
c845a99
Add CMake configuration and CFITSIO find module; update README and .g…
AmberLee2427 Oct 9, 2025
eadd963
Merge pull request #5 from AmberLee2427/feature/cmake
mtpenny Oct 10, 2025
ea4acd5
Adding ESPL.tbl
mtpenny Oct 10, 2025
6bf58ea
Merge branch 'gulls-microlensing:dev' into dev
mtpenny Oct 10, 2025
b5e3f6a
Merge pull request #14 from mtpenny/dev
mtpenny Oct 10, 2025
77c425d
Implement VBM timeout to preserve event statistics
AmberLee2427 Oct 14, 2025
74de456
Bug fix: Refactor Einstein radius calculations in drawsl function
AmberLee2427 Oct 16, 2025
7bd1e5d
Merge pull request #6 from AmberLee2427/feature/VBM-timeout-
mtpenny Oct 16, 2025
c80074a
Add comprehensive documentation and testing framework
AmberLee2427 Oct 17, 2025
fb1d690
Integrate documentation with Read the Docs and expand CI tests
AmberLee2427 Oct 17, 2025
fb43956
Delete PARAMETER_REFERENCE.md
AmberLee2427 Oct 17, 2025
76de285
Delete INPUT_FORMATS.md
AmberLee2427 Oct 17, 2025
162c116
Modify GitHub Actions workflow for testing
AmberLee2427 Oct 18, 2025
1779902
Fix CI workflows: install Fortran compiler and add branch trigger
AmberLee2427 Oct 18, 2025
a821154
Add Fortran compiler debugging and explicit CMake configuration
AmberLee2427 Oct 18, 2025
4262a89
Switch CI to use conda environment for dependencies
AmberLee2427 Oct 18, 2025
ecd81a1
Fix conda environment activation in CI
AmberLee2427 Oct 18, 2025
b43cdb3
Add stub implementations for numerical recipes functions
AmberLee2427 Oct 18, 2025
53edd07
Add missing stub functions for numerical recipes
AmberLee2427 Oct 18, 2025
1d35b08
Fix zroots function signature to match usage
AmberLee2427 Oct 18, 2025
bba6543
Add complex number overload for zroots function
AmberLee2427 Oct 18, 2025
51162ed
Add std::string overload for zroots function
AmberLee2427 Oct 18, 2025
87675d0
Add ESPL.tbl and optional Python dependencies for CI
AmberLee2427 Oct 18, 2025
ddc8e3d
Add numpy and VBMicrolensing to conda environment
AmberLee2427 Oct 18, 2025
f3e91dd
Fix observatory configuration and add validation
AmberLee2427 Oct 18, 2025
37e3948
Implement GSL-based fallback functions for Numerical Recipes
AmberLee2427 Oct 18, 2025
ebd2ca6
Update parameter file and increase buffer sizes in source files
AmberLee2427 Oct 20, 2025
a45d606
Fix CI failures: buffer overflow and infinite loop in RNG
AmberLee2427 Oct 20, 2025
a0c4fa9
Add comprehensive catalog validation
AmberLee2427 Oct 20, 2025
245792e
Enhance validate_inputs.py to use smoke test validation
AmberLee2427 Oct 20, 2025
1f78d9a
Update documentation to highlight input validation tool
AmberLee2427 Oct 20, 2025
84b9c9d
Add validation guidelines and GSL fallback warnings
AmberLee2427 Oct 20, 2025
255e292
Rename cmake.yml to environment.yml and update installation docs
AmberLee2427 Oct 21, 2025
4fb5a14
Document Numerical Recipes license requirement
AmberLee2427 Oct 21, 2025
a120827
Document Numerical Recipes license requirement
AmberLee2427 Oct 21, 2025
297c0ec
Clarify gulls_std.x handles bound planet simulations
AmberLee2427 Oct 21, 2025
82eed88
Add postprocessing repository to documentation
AmberLee2427 Oct 21, 2025
f4b1c21
Clarify NFILTERS parameter and add paper links
AmberLee2427 Oct 21, 2025
930f365
Clarify starfield catalog sizing is iterative process
AmberLee2427 Oct 21, 2025
5c283eb
Clarify l,b coordinates are field centers in catalog list files
AmberLee2427 Oct 21, 2025
e5351e4
Add missing input file types: weather, rates, and planets
AmberLee2427 Oct 21, 2025
3bae58e
Add comprehensive validation for weather, rates, and NFILTERS
AmberLee2427 Oct 21, 2025
b854b31
Add comprehensive observing sequence file documentation
AmberLee2427 Oct 21, 2025
a7ee0aa
Add validation for observing sequence files
AmberLee2427 Oct 21, 2025
cc1d564
Add comprehensive file existence validation
AmberLee2427 Oct 21, 2025
2049868
Expand validation documentation in Input File Formats
AmberLee2427 Oct 21, 2025
271475d
Fix indentation in test.yml for install dependencies
AmberLee2427 Oct 21, 2025
1ffc3b1
Change GULLS to Gulls throughout documentation
AmberLee2427 Oct 21, 2025
17b002c
Remove basic simulation example files
AmberLee2427 Oct 21, 2025
464ef05
Update version information in gulls.cpp to v2.0.0 and change release …
AmberLee2427 Oct 21, 2025
70e21a7
Add comprehensive version management system
AmberLee2427 Oct 21, 2025
bcdce6e
Update contributing and README for easy adoption by existing developers
AmberLee2427 Oct 21, 2025
281b016
Enhance CONTRIBUTING.md with new validation testing guidelines
AmberLee2427 Oct 21, 2025
b010376
Update CMake build instructions in CONTRIBUTING.md for improved clarity
AmberLee2427 Oct 21, 2025
237f73b
Update CHANGELOG.md for version 1.0.0
AmberLee2427 Oct 21, 2025
82d8714
Update documentation and remove obsolete files
AmberLee2427 Oct 21, 2025
431d039
Enhance README.md with updated build instructions and troubleshooting…
AmberLee2427 Oct 21, 2025
56e419b
Update documentation and clean up build artifacts
AmberLee2427 Oct 21, 2025
fb4f7bd
Update .gitignore to include documentation build artifacts
AmberLee2427 Oct 21, 2025
6899b88
Update smoke test setup instructions and dependencies
AmberLee2427 Oct 21, 2025
bbcdb0b
Remove obsolete binary source validation documentation
AmberLee2427 Oct 21, 2025
ef20ca0
Release version 2.0.0
AmberLee2427 Oct 21, 2025
6495da0
Release version 2.0.0
AmberLee2427 Oct 21, 2025
6407f04
Release version 2.0.1
AmberLee2427 Oct 21, 2025
2f89fdc
Release version 2.0.1
AmberLee2427 Oct 21, 2025
f5c21c1
Release version 2.0.1
AmberLee2427 Oct 21, 2025
3ae3036
Release version 2.0.1
AmberLee2427 Oct 21, 2025
fb8a194
Fix multi-line printf statement in gulls.cpp
AmberLee2427 Oct 21, 2025
41aebca
Release version 2.0.1
AmberLee2427 Oct 21, 2025
833f7d5
Fix malformed version string in conf.py
AmberLee2427 Oct 21, 2025
b1a28ba
Fix bump version script regex patterns
AmberLee2427 Oct 21, 2025
8e72053
Release version 2.0.1
AmberLee2427 Oct 21, 2025
99d69c4
Fix release workflow binary path
AmberLee2427 Oct 21, 2025
96de4db
Add --revert option to bump version script
AmberLee2427 Oct 21, 2025
e36c1b2
Add GSL fallback warnings to binary releases
AmberLee2427 Oct 21, 2025
05b0746
Update release workflow to specify Linux binaries only
AmberLee2427 Oct 21, 2025
d66d9be
Add smoke test plots to release notes
AmberLee2427 Oct 21, 2025
b34e65c
Release version 2.0.1
AmberLee2427 Oct 21, 2025
736c6df
Fix release notes to properly display plots
AmberLee2427 Oct 21, 2025
e14e220
Update PR message with latest features
AmberLee2427 Oct 22, 2025
2fbcdea
Update .gitignore, CHANGELOG, and CMakeLists for PSF generation utili…
AmberLee2427 Oct 22, 2025
3efd4b9
Release version 2.0.1
AmberLee2427 Oct 22, 2025
425d832
Release version 2.0.1
AmberLee2427 Oct 22, 2025
77d606d
Fix CI: Pass correct build directory to smoke test
AmberLee2427 Oct 22, 2025
2f0e306
Enhance PSF generation process in smoke tests
AmberLee2427 Oct 22, 2025
1d5bda9
Remove RELEASE_NOTES.md file as part of the cleanup process for the p…
AmberLee2427 Oct 22, 2025
32e4053
Release version 2.0.1
AmberLee2427 Oct 22, 2025
54648a9
Revert precompute_psf.cpp to original and simplify smoke test runner
AmberLee2427 Oct 22, 2025
0d7d54b
what a fucking diaster
AmberLee2427 Oct 22, 2025
0efae43
Enhance command-line argument handling in generateMoffatPSF
AmberLee2427 Oct 23, 2025
3d1bbe5
Release version 2.0.1
AmberLee2427 Oct 23, 2025
17c05a5
Release version 2.0.1
AmberLee2427 Oct 23, 2025
027505a
Release version 2.0.1
AmberLee2427 Oct 23, 2025
f7cebf0
Release version 2.0.1
AmberLee2427 Oct 23, 2025
1f8b6a1
Release version 2.0.1
AmberLee2427 Oct 23, 2025
7764756
Release version 2.0.1
AmberLee2427 Oct 23, 2025
338f3c2
Release version 2.0.1
AmberLee2427 Oct 23, 2025
78a5336
Release version 2.0.1
AmberLee2427 Oct 23, 2025
d13d53e
Release version 2.0.1
AmberLee2427 Oct 23, 2025
1de0a4f
Release version 2.0.1
AmberLee2427 Oct 23, 2025
5f78a4a
Release version 2.0.1 with major improvements in documentation, testi…
AmberLee2427 Oct 23, 2025
ec80b02
Revert version number to 2.0.0 in documentation and source files.
AmberLee2427 Oct 23, 2025
a9efdad
Remove outdated PR message documentation and update GitHub Actions wo…
AmberLee2427 Oct 23, 2025
d9eb1ff
Update CHANGELOG and CMake configuration; remove generate_psf_from_te…
AmberLee2427 Oct 23, 2025
47f86f9
Remove DEBUG_VS_RELEASE.md file containing detailed comparison of Deb…
AmberLee2427 Oct 23, 2025
6a03b8b
Merge branch 'dev' into feature/documentation-and-testing
mtpenny Oct 27, 2025
8346fdf
Merge pull request #7 from AmberLee2427/feature/documentation-and-tes…
mtpenny Oct 27, 2025
a8e8504
Merge branch 'gulls-microlensing:dev' into dev
mtpenny Oct 27, 2025
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
65 changes: 65 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build Documentation

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install Sphinx
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx-rtd-theme

- name: Build documentation
run: |
cd documentation
make html

- name: Upload documentation artifacts
uses: actions/upload-artifact@v4
with:
name: documentation
path: documentation/build/html/
retention-days: 7

deploy-docs:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: build-docs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install Sphinx
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx-rtd-theme

- name: Build documentation
run: |
cd documentation
make html

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./documentation/build/html
125 changes: 125 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: 3.9

- name: Install dependencies
shell: bash -l {0}
run: |
conda env create -f environment.yml
conda activate gulls
conda list

- name: Configure CMake
shell: bash -l {0}
run: |
conda activate gulls
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

- name: Build
shell: bash -l {0}
run: |
conda activate gulls
cmake --build build --parallel

- name: Run smoke tests and generate plots
shell: bash -l {0}
run: |
conda activate gulls
# Run smoke tests to generate plots
python smoke_test/run_smoke_test.py --ci --exec-timeout 610

# Create plots directory for release
mkdir -p release_plots

# Copy all generated plots to release directory
find smoke_test/output -name "*.png" -exec cp {} release_plots/ \;

# List what we found
echo "Generated plots for release:"
ls -la release_plots/


- name: Build documentation
shell: bash -l {0}
run: |
conda activate gulls
cd documentation
make html

- name: Create release archive
run: |
# Create source archive
git archive --format=tar.gz --prefix=gulls-${{ github.ref_name }}/ -o gulls-${{ github.ref_name }}.tar.gz HEAD

# Create binary archive with GSL fallback warning
echo "⚠️ WARNING: Binaries include GSL fallback implementations" > BINARY_WARNING.txt
echo "These are for testing/CI only and NOT suitable for production science." >> BINARY_WARNING.txt
echo "For production use, compile from source with licensed Numerical Recipes." >> BINARY_WARNING.txt
echo "" >> BINARY_WARNING.txt
echo "See documentation for details on replacing GSL stubs with Numerical Recipes." >> BINARY_WARNING.txt

tar -czf gulls-${{ github.ref_name }}-binaries.tar.gz bin/ documentation/build/html/ release_plots/ BINARY_WARNING.txt

- name: Generate plot assets and release notes
shell: bash -l {0}
run: |
# Create a list of plots for the release notes
echo "## Smoke Test Results" > PLOT_NOTES.md
echo "" >> PLOT_NOTES.md
echo "This release was validated with automated smoke tests. The plots below show sample lightcurves generated by the different Gulls executables:" >> PLOT_NOTES.md
echo "" >> PLOT_NOTES.md

# Add each plot to the release notes with full GitHub URLs
for plot in release_plots/*.png; do
if [ -f "$plot" ]; then
plot_name=$(basename "$plot")
echo "### $plot_name" >> PLOT_NOTES.md
echo "![$plot_name](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/$plot_name)" >> PLOT_NOTES.md
echo "" >> PLOT_NOTES.md
fi
done

# Show what we generated
echo "Generated plot notes:"
cat PLOT_NOTES.md

# Use RELEASE_NOTES.md if it exists, otherwise create default release body
if [ -f "RELEASE_NOTES.md" ]; then
echo "Using existing RELEASE_NOTES.md file"
else
echo "No RELEASE_NOTES.md found, falling back to default release body"
fi
python scripts/build_release_body.py --release-notes RELEASE_NOTES.md --plots PLOT_NOTES.md --output RELEASE_BODY.md

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
gulls-${{ github.ref_name }}.tar.gz
gulls-${{ github.ref_name }}-binaries.tar.gz
release_plots/*.png
body_path: RELEASE_BODY.md
generate_release_notes: false
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57 changes: 57 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Test Suite

on:
push:
branches: [ main, dev, feature/documentation-and-testing ]
pull_request:
branches: [ main, dev ]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
build_type: [Debug, Release]

steps:
- uses: actions/checkout@v4

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: 3.9

- name: Install dependencies
shell: bash -l {0}
run: |
conda env create -f environment.yml
conda activate gulls
conda list

- name: Configure CMake
shell: bash -l {0}
run: |
conda activate gulls
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}

- name: Build
shell: bash -l {0}
run: |
conda activate gulls
cmake --build build --parallel

- name: Run smoke tests (CI subset)
shell: bash -l {0}
run: |
conda activate gulls
python3 smoke_test/run_smoke_test.py --ci --exec-timeout 610

- name: Upload test artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-outputs-${{ matrix.os }}-${{ matrix.build_type }}
path: smoke_test/output/
retention-days: 7
35 changes: 33 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,40 @@ src/classes/random.cpp
src/classes/zroots2.cpp

# VBM files
src/ESPL.tbl
# src/ESPL.tbl # Now included in repo with Matt's permission

# CMake artifacts
build/
build/CMakeFiles/
build/.cmake
build/.cmake

# Smoke Tests
smoke_test/output/
smoke_test/__pycache__/
smoke_test/parameterfiles/__generated__/

# Documentation build artifacts
docs/_build/
docs/build/

# Python cache
__pycache__/
*.pyc
*.pyo

# IDE files
.vscode/
.idea/
*.swp
*.swo

# OS files
.DS_Store
Thumbs.db

# Documentation build artifacts
documentation/_build/
documentation/build/

# PSF files (generated in workflow/smoke tests)
smoke_test/assets/observatories/WFI_PSF.psf
68 changes: 68 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [2.0.0] - 2025-10-20

### Added
- Comprehensive documentation expansion with Sphinx/Read the Docs
- Input file format specifications and parameter reference
- Validation system for input catalogs and configuration files
- CI/CD pipeline with GitHub Actions
- Smoke test suite for automated testing
- CMake build system alongside traditional Makefile (includes `gulls_std`, `gulls_croin`, and `gullsFish`)
- Contributing guidelines and development workflow
- Example configurations and troubleshooting guides
- Missing docs build requirements in the `environment.yml`
- Smoke test output figures in Release Notes
- PSF generation utilities (`generateMoffat`, `precompute_psf`, `generateMoffatPSF`) to CMake build
- On-demand PSF file generation for smoke tests (no more 68MB files in git)
- Smart PSF caching system that reuses existing files when available

### Changed
- Improved error handling and user feedback
- Enhanced input validation with detailed error messages
- Streamlined installation process with better dependency management
- Updated documentation from legacy format to modern RST
- Simplified release workflow: patch > edit changelog > release
- PSF generation now uses proper subpixel sampling (9×9 = 81 variations)
- Smoke tests generate PSF files on-demand instead of requiring pre-committed files

### Fixed
- Buffer overflow issues in path handling
- Infinite loop bugs in random number generation
- Uninitialized memory issues in binary source calculations
- Off-by-one errors in catalog parsing
- Failure to build docs in the release workflow on GitHub
- PSF generation in CI environments (removed hardcoded local machine paths)
- PSF file size issues (now generates proper 68MB files with subpixel sampling)
- Simulation crashes due to missing or malformed PSF files

### Security
- Fixed potential buffer overflows in file path construction
- Improved input validation to prevent malformed data crashes

## [1.0.0] - 2013-2025

### Added
- Core microlensing simulation framework
- Support for single and binary sources/lenses
- Realistic observing conditions and detector effects
- Multiple observatory and filter system support
- Photometric signal generation
- Lens orbital motion
- Support for low-level VBMicrolensing functions
- Detection statistics and survey planning tools
- Fisher uncertainty estimation
- Many other features, executables, and documentation evolutions



### Original Development
- Initial implementation by Matthew Penny and collaborators
- Published in Penny et al. (2013, 2014, 2019)
- Core algorithms for gravitational microlensing event simulation
Loading
Loading