Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phasecurve #89

Merged
merged 12 commits into from
Mar 19, 2024
Merged

Phasecurve #89

merged 12 commits into from
Mar 19, 2024

Conversation

jrob93
Copy link
Collaborator

@jrob93 jrob93 commented Mar 18, 2024

Create the initial PhaseCurve class, contains the modules required to initialise an sbpy phase curve model, get the model reduced mag from phase angle and do some a simple model fit to observations. Unit tests to follow.

Closes #44

Review Checklist for Source Code Changes

  • Does pip install still work?
  • Have you written a unit test for any new functions?
  • Do all the units tests run successfully?
  • Have you used black on the files you have updated to confirm python programming style guide enforcement?

@jrob93 jrob93 linked an issue Mar 18, 2024 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 53.84615% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 62.60%. Comparing base (b080dda) to head (fb90a0b).

Files Patch % Lines
src/adler/science/PhaseCurve.py 57.14% 21 Missing ⚠️
src/adler/adler.py 0.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
- Coverage   69.84%   62.60%   -7.24%     
==========================================
  Files           3        4       +1     
  Lines          63      115      +52     
==========================================
+ Hits           44       72      +28     
- Misses         19       43      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jrob93
Copy link
Collaborator Author

jrob93 commented Mar 18, 2024

Added some basic unit tests

@jrob93 jrob93 requested a review from astronomerritt March 18, 2024 17:22
@astronomerritt
Copy link
Collaborator

I think you need to re-pull and merge main here - this isn't compatible with the latest changes to the dataclasses (sorry!). When I run:

>> adler -s 8268570668335894776

I'm getting:

Traceback (most recent call last):
  File "/home/smerritt/.local/bin/adler", line 8, in <module>
    sys.exit(main())
  File "/home/smerritt/adler/src/adler/adler.py", line 31, in main
    runAdler(args)
  File "/home/smerritt/adler/src/adler/adler.py", line 13, in runAdler
    pc = PhaseCurve(abs_mag=planetoid.SSObject.r_H, phase_param=0.2, model_name="HG")
AttributeError: 'SSObject' object has no attribute 'r_H'

This should be SSObject.H[2], I believe. SSObject's filter-dependent class attributes are now lists in the order of the requested filters.

@jrob93
Copy link
Collaborator Author

jrob93 commented Mar 19, 2024

Cool, I forgot about the command line stuff. I'll just change that bit to what you suggested. This will probably be changed later when issue #77 is dealt with

@astronomerritt
Copy link
Collaborator

Yep, just fix for now so everything runs - once I've gotten around to #77 I'll change the call in adler.py as well!

@jrob93 jrob93 merged commit b005e3e into main Mar 19, 2024
6 checks passed
@jrob93 jrob93 deleted the phasecurve branch March 19, 2024 15:11
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.

Initial PhaseCurve class
3 participants