Skip to content

Using my data #73

@chornelis-08

Description

@chornelis-08

Hello sir,
I am chornelis, I hope you are in a good condition. I want to finish my thesis about analysis data photometry using your code with my data. But, when i try the tutorial 3, "img=si.SingleImage(img_path)"
the error shows like this

RuntimeError Traceback (most recent call last)

in ()
----> 1 img=si.SingleImage(img_path)

3 frames

/usr/local/lib/python3.7/dist-packages/properimage/single_image.py in init(self, img, mask, maskthresh, stamp_shape, borders, crop, min_sources, strict_star_pick, smooth_psf, gain)
120 self.maskthresh = maskthresh
121 self.data = img
--> 122 self.mask = mask
123 self._bkg = maskthresh
124 self.stamp_shape = stamp_shape

/usr/local/lib/python3.7/dist-packages/properimage/single_image.py in mask(self, mask)
335 for i_enlarge in range(7):
336 enlarged_mask = convolve_scp(
--> 337 self.__data.mask.astype(int), np.ones((3, 3))
338 )
339 enlarged_mask = enlarged_mask.astype(int) > 2

/usr/local/lib/python3.7/dist-packages/scipy/ndimage/filters.py in convolve(input, weights, output, mode, cval, origin)
753 """
754 return _correlate_or_convolve(input, weights, output, mode, cval,
--> 755 origin, True)
756
757

/usr/local/lib/python3.7/dist-packages/scipy/ndimage/filters.py in _correlate_or_convolve(input, weights, output, mode, cval, origin, convolution)
603 wshape = [ii for ii in weights.shape if ii > 0]
604 if len(wshape) != input.ndim:
--> 605 raise RuntimeError('filter weights array has incorrect shape.')
606 if convolution:
607 weights = weights[tuple([slice(None, None, -1)] * weights.ndim)]

RuntimeError: filter weights array has incorrect shape.

what should i do with that error? Can you help me sir?

my regards, chornelis

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