simonsobs / pspy

Python power spectrum code
Other
7 stars 5 forks source link

move maps2params to data_analysis #43

Closed adrien-laposta closed 1 year ago

codecov-commenter commented 1 year ago

Codecov Report

Merging #43 (16283dd) into master (9f44336) will increase coverage by 0.20%. The diff coverage is 61.53%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/simonsobs/pspy/pull/43/graphs/tree.svg?width=650&height=150&src=pr&token=8HQ0DZDROW&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs)](https://app.codecov.io/gh/simonsobs/pspy/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs) ```diff @@ Coverage Diff @@ ## master #43 +/- ## ========================================== + Coverage 28.21% 28.42% +0.20% ========================================== Files 18 18 Lines 1949 1956 +7 ========================================== + Hits 550 556 +6 - Misses 1399 1400 +1 ``` | [Impacted Files](https://app.codecov.io/gh/simonsobs/pspy/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs) | Coverage Δ | | |---|---|---| | [pspy/pspy\_utils.py](https://app.codecov.io/gh/simonsobs/pspy/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs#diff-cHNweS9wc3B5X3V0aWxzLnB5) | `32.90% <25.00%> (-0.89%)` | :arrow_down: | | [pspy/so\_map.py](https://app.codecov.io/gh/simonsobs/pspy/pull/43?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs#diff-cHNweS9zb19tYXAucHk=) | `41.50% <92.85%> (+1.28%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/simonsobs/pspy/pull/43/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simonsobs)
xgarrido commented 1 year ago

Given your new function car_template_from_shape_wcs, I will simplify the car_template and full_sky_car_template with something like

def car_template(ncomp, ra0, ra1, dec0, dec1, res):
    """Create a ``so_map`` template with CAR pixellisation in equ coordinates.

    Parameters
    ----------
    ncomp: integer
      the number of components of the map can be 1 or 3 (for T,Q,U)
    ra0,dec0,ra1,dec1: floats
      coordinates of the box in degrees
    res: float
      resolution in arcminute
    """

    if ncomp == 3:
        pre = (3,)
    else:
        pre = ()

    box = get_box(ra0, ra1, dec0, dec1)
    res = res * np.pi / (180 * 60)
    shape, wcs = enmap.geometry(box, res=res, pre=pre)
    return car_template_from_shape_wcs(ncomp, shape, wcs)

same for full_sky_car_template