-
Notifications
You must be signed in to change notification settings - Fork 0
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
WIP physical params file. #7
Conversation
Pull Request Test Coverage Report for Build 11843911262Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor comments and possible suggestions on formatting. Getting excited to see this all running!
Co-authored-by: Joachim Moeyens <[email protected]>
Co-authored-by: Joachim Moeyens <[email protected]>
…-Institute/adam_impacts_study into kk/physical-params
Co-authored-by: Joachim Moeyens <[email protected]>
Co-authored-by: Joachim Moeyens <[email protected]>
Testing removal of test: def test_for_impact_dates(impactors_file_mock): propagator = ASSISTPropagator() initial_orbit_objects = impactor_file_to_adam_orbit(impactors_file_mock) for obj_id in initial_orbit_objects: impactor_orbit_object = obj_id results, impacts = propagator.detect_impacts(impactor_orbit_object, 60) assert ( abs( impactor_orbit_object.coordinates.time.add_days(30).to_numpy()[0] - impacts.coordinates.time.to_numpy()[0] ) < 1 )
…-Institute/adam_impacts_study into kk/physical-params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but confider saving and loading the impact configs as parquet or csv if they need to be human readable using to_[format] / from_[format] on the quivr tables.
S_type = ImpactorConfig.from_kwargs( | ||
config_id=[f"S_type_{run_id}"], | ||
ast_class=["S"], | ||
albedo_min=[config_data.get("S_albedo_min", 0.10)], | ||
albedo_max=[config_data.get("S_albedo_max", 0.22)], | ||
albedo_distribution=["uniform"], | ||
percentage=[config_data.get("percent_S", 0.5)], | ||
min_diam=[config_data.get("min_diam", 0.01)], | ||
max_diam=[config_data.get("max_diam", 1)], | ||
u_r=[config_data.get("u_r_S", 2.182)], | ||
g_r=[config_data.get("g_r_S", 0.65)], | ||
i_r=[config_data.get("i_r_S", -0.2)], | ||
z_r=[config_data.get("z_r_S", -0.146)], | ||
y_r=[config_data.get("y_r_S", -0.151)], | ||
) | ||
|
||
C_type = ImpactorConfig.from_kwargs( | ||
config_id=[f"C_type_{run_id}"], | ||
ast_class=["C"], | ||
albedo_min=[config_data.get("C_albedo_min", 0.03)], | ||
albedo_max=[config_data.get("C_albedo_max", 0.09)], | ||
albedo_distribution=["uniform"], | ||
percentage=[config_data.get("percent_C", 0.5)], | ||
min_diam=[config_data.get("min_diam", 0.01)], | ||
max_diam=[config_data.get("max_diam", 1)], | ||
u_r=[config_data.get("u_r_C", 1.786)], | ||
g_r=[config_data.get("g_r_C", 0.474)], | ||
i_r=[config_data.get("i_r_C", -0.119)], | ||
z_r=[config_data.get("z_r_C", -0.126)], | ||
y_r=[config_data.get("y_r_C", -0.131)], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could store the config file using ImpactorConfig, either as parquet or as csv. (e.g. to_csv). CSV would allow it to be human readable, if that's important. Then you can just load it in with a single command.
May contain some bugs, old unit tests need to be updated and will definitely fail.