Skip to content
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

Size error with ACT DR4 #1

Open
zonca opened this issue May 23, 2024 · 3 comments
Open

Size error with ACT DR4 #1

zonca opened this issue May 23, 2024 · 3 comments

Comments

@zonca
Copy link
Member

zonca commented May 23, 2024

Tried to run the example with ACTPol_148_D5_PA1_S1_1way_I.fits from https://lambda.gsfc.nasa.gov/product/act/actpol_maps_get.html

I get an error in the shape of the arrays:

python fits.py create ACTPol_148_D5_PA1_S1_1way_I.fits ACTPol_148_D5_PA1_S1_1w
ay_I
Traceback (most recent call last):
  File "/home/zonca/p/software/tilemaker/example/fits.py", line 48, in <module>
    tree = LayerTree(number_of_layers=number_of_layers, image_pixel_size=tile_size, image=fits_image)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zonca/p/software/tilemaker/tilemaker/processing/fits_simple.py", line 422, in __init__
    layer.create_data_from_children()
  File "/home/zonca/p/software/tilemaker/tilemaker/processing/fits_simple.py", line 382, in create_data_from_children
    node.create_data_from_children()
  File "/home/zonca/p/software/tilemaker/tilemaker/processing/fits_simple.py", line 310, in create_data_from_children
    data_buffer[covered_region] = 0.25 * child_data
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^
ValueError: could not broadcast input array from shape (667,675) into shape (674,675)
@JBorrow
Copy link
Member

JBorrow commented May 23, 2024

Oh no, that really shouldn't happen! I will look into this tomorrow, can you progress using the (admittedly larger) DR5 data for now?

@zonca
Copy link
Member Author

zonca commented May 26, 2024

yes, I had to use NERSC to create the DB, 6 GB RAM on my laptop were not enough, but now works fine.

@JBorrow
Copy link
Member

JBorrow commented May 29, 2024

Looks like this originates from the DR4 maps not being full-sky. I had thought that pixell always returned a full array when reading off the edge of the map with WCS, and it turns out it doesn't. Will need to fix that (there is some code to do this already within the other FITS backend).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants