quatrope / ProperImage

Proper Image utils for astronomy.
BSD 3-Clause "New" or "Revised" License
26 stars 6 forks source link

Fill values to array fails. #1

Closed BrunoSanchez closed 8 years ago

BrunoSanchez commented 8 years ago

` for img in imglist:

        newcat = img._best_srcs['sources']
        newcat = append_fields(newcat, 'sourceid',
                               np.repeat(0, len(newcat)),
                               usemask=False,
                               dtypes=int)

        ids, mask = matching(mastercat, newcat, masteridskey='sourceid',
                             angular=False, radius=1., masked=True)

        for i in range(len(ids[mask])):
            print ids[mask][i]
            newcat[mask]['sourceid'][i] = ids[mask][i]
            print newcat[mask]['sourceid'][i]

newcat[mask]['sourceid'] = np.array(ids[mask])

`

This is on lines 222 of properimage/utils.py

Trying to fill the values of newcat, but there is no traceback, it doesn't fail, but it is not working neither.

Something related to the creation of the field 'sourceid' must be wrong.

Any ideas?