nhurleywalker / fits_warp

Warp catalogues and images to dedistort the effects of the ionosphere
Other
6 stars 5 forks source link

Cross matching fails if len(sources) > len(catalogue) #4

Open torrance opened 6 years ago

torrance commented 6 years ago

I have a catalogue/sky model of 2000 sources and a list of sources identified by Aegean which has ~4500 sources.

Running fits_warp in cross matching mode results in a index out of bounds error deep inside Astropy, but the last line inside fits_warp is https://github.com/nhurleywalker/fits_warp/blob/02af5cb7aeaaf0b54b4b60260e49cec942645704/fits_warp.py#L344

It seems match_to_catalog_sky() expects the Aegean list to be shorter than the sky model, even though this doesn't appear to be documented anywhere.

PaulHancock commented 6 years ago

seems to occur when the center object is created with a reference ra/dec that is either nan or inf. Will investigate further.