-
Notifications
You must be signed in to change notification settings - Fork 25
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
Initial port of tynt to filter_parameterization subpackage #257
Conversation
@bmorris3 , I tried to parameterize a filter I have at hand and the result doesn't look as good as what you have over at |
e471801
to
dfb3ca4
Compare
Sure happy to help/iterate. Two things are most important for getting accurate representations of the transmittance curves:
The ringing that you see red- and blue-ward of the bandpass is an inevitable artifact of the truncated Fourier series used to represent the bandpass, and you can get better approximations off of the bandpass if you clip the wavelength grid liberally. If you're looking to do this agnostically/algorithmically, perhaps clip the wavelength grid to anywhere where the transmittance is greater than 0.1% – I bet that will help with minimal side-effects on the synthetic photometry. |
@bmorris3 , thanks! It looks much better now. 😄 |
@bmorris3 , I think I am done porting over what I think is relevant for now. Would you mind reviewing it? Thank you! |
Codecov Report
@@ Coverage Diff @@
## master #257 +/- ##
==========================================
+ Coverage 94.29% 94.46% +0.16%
==========================================
Files 14 17 +3
Lines 1999 2096 +97
==========================================
+ Hits 1885 1980 +95
- Misses 114 116 +2
Continue to review full report at Codecov.
|
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.
This looks great. I just looked it over again and I don't see anything amiss. Thanks again for giving me credit here and there 😄
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.
Overall I like this! A few typos/rewordings inline, and two suggestions that can either be done now or made into issues for follow-on PRs.
it is up to you to decide whether the results are good enough for your | ||
use cases or not. |
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.
Maybe we want to add an issue after this is merged to update this with a bit more useful guidance on what use cases it's good for? E.g. "approximating filter X with N coefficients yields a curve that is Y% as good as the full data set." It's a minor project to actually do that for a few filters though, so I think it's fine if we have this be a follow-on issue instead of blocking this PR.
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.
Opened issue at #332
For this particular example using HST ACS/HRC F555W filter, perhaps 10 | ||
parameters are not quite sufficient. Therefore, caution needs to be exercised |
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.
Maybe there should be one more snippet below that shows a reconstruction with more than 10 fft coefficients? That would also demonstrate how to actually do that for the user (I know it's in the API, but since it's coming up, might as well show it here).
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.
I'll chuck this as follow-up issue because I have no idea what you mean anymore. I haven't thought about this for 2 years. 😆 See #333
fft_table['lambda_0'].unit = wave_unit | ||
fft_table['delta_lambda'].unit = wave_unit | ||
|
||
return fft_table |
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.
Maybe it also makes sense to add a convenience function filter_table_to_models
function that takes a table and returns a dictionary of models for all of the table rows? This could also be a follow-on PR, though.
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.
Opened issue at #334
[ci skip] Co-authored-by: Brett Morris <[email protected]>
Co-authored-by: Brett Morris <[email protected]>
Add NUMPY_LT_1_17 compat.
[ci skip] Co-authored-by: Erik Tollerud <[email protected]>
a99b253
to
e54107c
Compare
TST: Fix flake8 warning
Better late than never. Thanks, all! |
Based on bmorris3/tynt#8 . This would be the foundation for #38 .
Co-authored-by: @bmorris3
cc @perrygreenfield
TODO
tynt
.tynt
.Quantity
natively.Include an initial FFT table as package data with a small sample of generic filters? If we do this, should regenerate the table with the code here and compare to the one inLet's not do that this round. Maybe for the future.tynt
, if applicable.