Skip to content

under-sampling warning / fix #34

@seanandrews

Description

@seanandrews

When you use a model that has resolution (cell size) larger than the spatial scales sampled by the (u,v) points you're calculating the FT for, the code barfs and the errors thrown aren't intelligible. You could pad the model and/or just throw an exception that demands the user fixes the model to actually make sense for the context of the visibility dataset. For reference, you'll see errors like:

mvis = vis_sample(imagefile=foo, uu=u, vv=v, mod_interp=False)

File "/home/sandrews/anaconda3/lib/python3.7/site-packages/vis_sample/vis_sampler.py", line 288, in vis_sample
interp, gcf_holder = interpolate_uv(uu, vv, mod_fft)
File "/home/sandrews/anaconda3/lib/python3.7/site-packages/vis_sample/interpolation.py", line 120, in interpolate_uv
gcf_holder = create_gcf_holder(uu, vv, vis)
File "/home/sandrews/anaconda3/lib/python3.7/site-packages/vis_sample/interpolation.py", line 68, in create_gcf_holder
u0 = uu - vis.uu[iu0.astype(int)]
IndexError: index 262 is out of bounds for axis 0 with size 260

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions