darafferty / LSMTool

LOFAR Local Sky Model Tool
https://lsmtool.readthedocs.io
GNU General Public License v3.0
8 stars 5 forks source link

Wrong spectral index when concatenating two skymodel #35

Open flomertens opened 2 years ago

flomertens commented 2 years ago

I tried to concatenate two sky model with the following code:

import lsmtool
s1 = lsmtool.load('catalog.skymodel')
s2 = lsmtool.load('Ateam_lowres.skymodel')
lsmtool.operations.concatenate.concatenate(s1, s2)

this used to work fine with earlier version of lsmtool but with version 1.4.9, I get wrong spectral index and ref frequency in the resulting skymodel.

For example, previously (output_1-4-7.skymodel):

1858.9+2503, POINT, Main, 18:58:54.2496, 25.03.00.684, 1.2851, 0.0, 0.0, 0.0, 60000000.0, [-0.4473, 0.0], 0.0, 0.0, 0.0

now (output_1-4-9.skymodel):

1858.9+2503, POINT, Main, 18:58:54.2496, 25.03.00.684, 1.2851, 0.0, 0.0, 0.0, 999999.0, [-0.4473, 1e+20], 0.0, 0.0, 0.0

catalog.skymodel.txt Ateam_lowres.skymodel.txt output_1-4-7.skymodel.txt output_1-4-9.skymodel.txt

darafferty commented 2 years ago

Thanks for reporting this issue (and including all the info to make it easy to reproduce!). It should be fixed now on the current master, and we will make a new release soon (likely v1.4.10) that includes the fixes.