Log smooth powerlaw bug#3164
Open
aldo9253 wants to merge 8 commits intoIMAP-Science-Operations-Center:devfrom
Open
Log smooth powerlaw bug#3164aldo9253 wants to merge 8 commits intoIMAP-Science-Operations-Center:devfrom
aldo9253 wants to merge 8 commits intoIMAP-Science-Operations-Center:devfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes IDEX L2A dust velocity/mass estimation around the calibration “log smooth powerlaw” by correcting calibration-file usage, using the intended transition-sharpness parameter in the calibration curve, and clarifying/adjusting units (notably pC → C).
Changes:
- Swapped the two IDEX calibration CSV inputs so
t_rise_paramsandyield_paramsare loaded from the correct files. - Fixed
log_smooth_powerlaw()to usek(notm) for the smooth transition terms. - Converted fitted signal amplitude from pC to C before computing mass, and updated several unit-related docstrings/comments.
Comments suppressed due to low confidence (1)
imap_processing/idex/idex_l2a.py:916
fit_impact()now documentstime/time_of_impactin microseconds andamplitudein pC, butrise_timeanddischarge_timeare still documented as seconds. Since these time constants are used directly in the exponent withtime(and upstream initial guesses are in microseconds), the docstrings forrise_time/discharge_timeshould also be updated to microseconds for consistency and correctness.
amplitude : float
Signal height (pC).
rise_time : float
How fast the signal rises (s).
discharge_time : float
How fast the signal decays (s).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
355
to
+357
| yield_val = 10 ** log_smooth_powerlaw(np.log10(v_est), log_a_y, yield_params[1:]) | ||
| mass_est = sig_amp / yield_val | ||
| sig_amp_coulombs = sig_amp * 1e-12 | ||
| mass_est = sig_amp_coulombs / yield_val |
lacoak21
approved these changes
May 8, 2026
Contributor
lacoak21
left a comment
There was a problem hiding this comment.
Approved! Excellent work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Added comments to clarify unit input/output from functions. Corrected variable usage in log_smooth_powerlaw and swapped calibration files.
#3163
Overview
idex_l2a.py
File changes
Re-processed l2a from 2026-04-12 and inspected fits.
Testing