-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
Ins: UltraRelated to the IMAP-Ultra instrumentRelated to the IMAP-Ultra instrumentMapper ToolsWork related to common mapper toolsWork related to common mapper tools
Description
Currently, it sounds like if we get a nan value in the healpix subdivision, we are "poisoning" the entire rectangular grid cell with that result. We should ignore those nan values in our calculations, and only set the value to nan if all healpix values are nan within that rectangular cell. i.e. if we have one good healpix value and 5 nan's, we should only use that one good value with the associated exposure time / angle etc. and not anything else.
I think this is the relevant area of the code.
imap_processing/imap_processing/ena_maps/ena_maps.py
Lines 1672 to 1679 in 3fe8424
| # Weighted mean (weighted by solid angle) of these values over the pixel axis, | |
| # which is the last axis of this array | |
| weighted_hp_vals_at_rect_pix_ctrs = ( | |
| hp_vals_at_rect_pix_ctrs * rect_subpix_solid_angle_by_lat | |
| ) | |
| mean_pixel_value = ( | |
| weighted_hp_vals_at_rect_pix_ctrs.sum(axis=-1) / full_rect_pixel_solid_angle | |
| ) |
Relevant tests here:
| def test_to_rectangular_skymap( |
| def test_calculate_rect_pixel_value_from_healpix_map_n_subdivisions( |
| def test_get_rect_pixel_value_recursive_subdivs( |
Metadata
Metadata
Assignees
Labels
Ins: UltraRelated to the IMAP-Ultra instrumentRelated to the IMAP-Ultra instrumentMapper ToolsWork related to common mapper toolsWork related to common mapper tools