-
Notifications
You must be signed in to change notification settings - Fork 19
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
Sss module #473
Sss module #473
Conversation
Thank you for grateful work! I think binning will be helpful. |
Thanks for taking a look @tterasaki. Feel free to commit a binning function and any statistics you want. We could probably implement a linreg function as we did in the hwpss module as well using Now that you point out that we want to be able to bin over all of the observations in order to make a ground template, I'm realizing that my conversion from az pointing -> x won't work. It takes x to +/-1 for the az range in the given TOD not the full 360 deg az range. I suspect that's not what we want to do either. We want x to be az normalized to have +/-180 = +/-1 always and have the bins always be defined over that full +/-180 range. That should be a relatively simple code change, but without testing, I'm not sure the fits won't be worse when fitting a subset of the az-range instead of the full +/-180. |
An incomplete list of thoughts:
More thoughts on binning / data products:
|
I have added the binning (and removed the tod fitting). One note is that default of binning [-np.pi, np.pi]. You can see my demonstration in |
I like the Next, I think we want to add the preprocess module process so that the 2 related questions for @kmharrington:
|
@msilvafe Can we merge this PR into master? I mean, although there are something to be updated around preprocessing, the core of this PR looks working with the site data. This function is useful for current site data with SSS. So I want to merge it if it is possible and work on the preprocessing stuff in another branch. |
I have one last set of local changes to this to pull the fitting part out of the main sss function into its own function. I think that's the last thing I wanted to do before converting to a real PR from draft. Can you wait for that? |
@mhasself and @tterasaki I think this is ready for review so we can merge and start using it on the commissioning data. I moved the fitting function out of the main One detail which we can decide to update later is if we want this merged to use the |
Looks nice. Thank you Max! |
I looked over this, and it all looks good! Thanks for @tterasaki. I ran the sphinx-build on the docs to see how they looked and added some minor things related to typos, missing returned parameters, formatting, etc. |
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.
Looks great! I think class name "EstimateAzSS" would be more consistent with our other applications of PascalCase; I don't really like "EstimateAZSS". But merging is in your hands now.
sotodlib/preprocess/processes.py
Outdated
@@ -245,22 +245,25 @@ def process(self, aman, proc_aman): | |||
hwp.demod_tod(aman, **self.process_cfgs) | |||
|
|||
|
|||
class EstimateSSS(_Preprocess): | |||
"""Fits the amplitude of legendre polynomials in sig vs Az space. | |||
class EstimateAZSS(_Preprocess): |
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.
Did you mean "AZSS"? I would have thought "AzSS".
sotodlib/tod_ops/azss.py
Outdated
@@ -0,0 +1,225 @@ | |||
"""Module for estimating Aziumth Synchronous Signal (azss)""" |
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.
Aziumth -> Azimuth.
This adds the ability to fit out Legendre polynomials in az-signal space for ground/sss template subtraction. I added the basic fitter and signal subtraction functions that interface with the axis managers, much like the hwpss module. There's some basic docs and a simple unit test in here as well. However, I think there are a few things worth discussing and/or adding before we move into final PR review:
I have tested that this works on both a toast sim on simons one found here:
/home/msilvafe/mnt/flp_dev/sat_sims/20221213/out_sss
and a dummy axis manager I created that just has az-legendre polynomials and white noise (function is in the unit test script to generate this). Some examples of those below:Both of these are generated in a notebook on simons1:
'/mnt/so1/users/msilvafe/notebooks/flp_dev/20230518_TOD_Processing.ipynb'