simonsobs / SOOPERCOOL

5 stars 3 forks source link

Pure b #28

Closed ellie-gleave closed 7 months ago

ellie-gleave commented 9 months ago

added options for mask-based purification and pure B-mode sims

in params file (paramfile_pure_b.yaml) these are pure_B and pureB_sims, respectively

kwolz commented 8 months ago

Hi @ellie-gleave, in your first version of this PR you implemented an option to null the E-mode maps at the preprocessing stage. Why is this needed? Should we consider keeping it in the pipeline?

ellie-gleave commented 8 months ago

@kwolz Yes that's still needed—it's to generate a comparison which has 'perfect' purification

kwolz commented 8 months ago

@ellie-gleave Okay, would it be reasonable to make this option only available to mock data and (covariance) sims? To test purification, one can still look at those. The TF validation and estimation sims should not be analytically B-purified (meaning using the NaMaster option) since we found the resulting transfer function to be unstable.

kwolz commented 7 months ago

Summary of latest changes in mask_handler.py:

Bai-Chiang commented 7 months ago

Thanks, this solves #31. We should also remove --self_assemble argument in run_all.sh.

kwolz commented 7 months ago

May I ask where could I find documentation about the spin derivatives? I don't know what it is. Thanks.

The canonical reference to this is, I believe, https://arxiv.org/pdf/0903.2350.pdf The first and second spin derivative are, up to a factor, the second and third term on the rhs of eq (24).

chervias commented 7 months ago

I think there is a bug when using a custom nhits map. Here you simply load the nhits mask instead of building one. No new nhits map is created. In the next script, mocker.py, it will try to load the hits map here, which will be a function on metadata_manager.py. Here it will try to load the hits map, which calls the variable self.nhits_map_name, which has the string defined under nhits_map in the param file, which was not created in the first place, so the script fails.

Bai-Chiang commented 7 months ago

@chervias I made some quick fix to use my custom hitmap https://github.com/simonsobs/SOOPERCOOL/compare/pure_b...Bai-Chiang:SOOPERCOOL:read_hitmap If you think it's fine I could create a PR.

chervias commented 7 months ago

Yes, @Bai-Chiang can you PR into this branch please?

Bai-Chiang commented 7 months ago

33

chervias commented 7 months ago

Thanks @Bai-Chiang the bug regarding using a hits map from the user is fixed.

kwolz commented 7 months ago

The latest commit fixed the case handling of the two parameter file arguments pure_B and tf_est_pure_B. This is now ready for review to merge into main.

chervias commented 7 months ago

I tested with my own hits map, in both m_filterer and toast cases. It looks good to me. I would merge.