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

Issue #94: proposed 1L2S get_trajectory bug fixes #98

Merged
merged 14 commits into from
Dec 7, 2023
Merged

Conversation

jenniferyee
Copy link
Collaborator

Proposed bug fixes for Model.get_trajectory() and FitData.get_dataset_trajectory(). Also updated Ex 17 to include plotting of 1L2S trajectory figure and added unittests for Model.get_trajectory() and FitData.get_dataset_trajectory(). These unit tests currently fail. We need to update the reference files to include trajectory X, Y, first.

@jenniferyee
Copy link
Collaborator Author

Specifically, what is needed:

SAMPLE_FILE_03_REF = join(dir_2, 'ob140939_Spitzer_ref_v1.dat')

Needs columns ADDED for Spitzer source trajectory X and Y positions as in

ref_Spitzer = np.loadtxt(SAMPLE_FILE_03_REF, unpack=True)
ratio_x = trajectory.x / ref_Spitzer[6]
ratio_y = trajectory.y / ref_Spitzer[7]

@rpoleski
Copy link
Owner

@jenniferyee I would just test against values returned by current code - are you ok with that? It'll take me relatively long to get them from independent code like sfit.

@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (537e33c) 83.45% compared to head (bf40fcb) 83.63%.
Report is 12 commits behind head on master.

Files Patch % Lines
source/MulensModel/model.py 90.00% 1 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
+ Coverage   83.45%   83.63%   +0.18%     
==========================================
  Files          52       52              
  Lines        8176     8269      +93     
==========================================
+ Hits         6823     6916      +93     
  Misses       1353     1353              
Flag Coverage Δ
unittests 83.63% <99.01%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@rpoleski
Copy link
Owner

Without running the code, I see that Model.get_trajectory() should have satellite_skycoord keyword describe. It's a new aspect of API, so we should change the version to 2.19.

Copy link
Owner

@rpoleski rpoleski left a comment

Choose a reason for hiding this comment

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

Model.get_trajectory() docstrings need updates:

  1. satellite_skycoord has to be described
  2. returned type for binary source has to be given.

Everything else is OK.

@rpoleski rpoleski merged commit c4b1698 into master Dec 7, 2023
1 check failed
@jenniferyee
Copy link
Collaborator Author

jenniferyee commented Dec 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants