Open chornelis-08 opened 2 years ago
Hi, this issue seems to be related with the mask setting. Apparently it fails to enlarge the mask. What kind of data are you using? Are these telescope images? Is the format of a fits data file? Do they have a mask plane? Do they have a gain key in their header? I think this information is important for the software to function properly.
yes sir, thanks for you comment. The data is a telescope images and the format is fit. My data only using standard reducing (dark, bias and flat) without mask plan. And the data have gain key. I attach header of my data,
SIMPLE = T
BITPIX = 16 /8 unsigned int, 16 & 32 int, -32 & -64 real
NAXIS = 2 /number of axes
NAXIS1 = 1530 /fastest changing axis
NAXIS2 = 1020 /next to fastest changing axis
BSCALE = 1.0000000000000000 /physical = BZERO + BSCALEarray_value
BZERO = 32768.000000000000 /physical = BZERO + BSCALEarray_value
DATE-OBS= '2015-08-28T11:53:28' /YYYY-MM-DDThh:mm:ss observation start, UT
EXPTIME = 25.000000000000000 /Exposure time in seconds
EXPOSURE= 25.000000000000000 /Exposure time in seconds
SET-TEMP= -10.000000000000000 /CCD temperature setpoint in C
CCD-TEMP= -10.203084036736080 /CCD temperature at start of exposure in C
XPIXSZ = 9.0000000000000000 /Pixel Width in microns (after binning)
YPIXSZ = 9.0000000000000000 /Pixel Height in microns (after binning)
XBINNING= 1 /Binning factor in width
YBINNING= 1 /Binning factor in height
XORGSUBF= 0 /Subframe X position in binned pixels
YORGSUBF= 0 /Subframe Y position in binned pixels
FILTER = 'Bessel R' / Filter used when taking image
IMAGETYP= 'Light Frame' / Type of image
FOCUSPOS= 13109 /Focuser position in steps
FOCUSSSZ= 0.00000000000000000 /Focuser step size in microns
OBJECT = 'ngc6494-bslr-25s'
OBJCTRA = '17 57 01' / Nominal Right Ascension of center of image
OBJCTDEC= '-18 59 45' / Nominal Declination of center of image
OBJCTALT= ' 76.0436' / Nominal altitude of center of image
OBJCTAZ = '151.4330' / Nominal azimuth of center of image
OBJCTHA = ' -0.4671' / Nominal hour angle of center of image
PIERSIDE= 'WEST ' / Side of pier telescope is on
SITELAT = '-06 49 00' / Latitude of the imaging location
SITELONG= '107 36 58' / Longitude of the imaging location
JD = 2457262.9954629629 /Julian Date at start of exposure
JD-HELIO= 2457262.9980319054 /Heliocentric Julian Date at exposure midpoint
AIRMASS = 1.0305493990373527 /Relative optical path length through atmosphere
FOCALLEN= 1758.0000000000000 /Focal length of telescope in mm
APTDIA = 280.00000000000000 /Aperture diameter of telescope in mm
APTAREA = 54457.122554969785 /Aperture area of telescope in mm^2
EGAIN = 2.6199998855590820 /Electronic gain in e-/ADU
SWCREATE= 'MaxIm DL Version 5.24 131112 2W8HJ' /Name of software that created
the image
SBSTDVER= 'SBFITSEXT Version 1.0' /Version of SBFITSEXT standard in effect
TELESCOP= ' ' / telescope used to acquire this image
INSTRUME= 'SBIG ST-8 3 CCD Camera'
OBSERVER= ' '
NOTES = ' '
FLIPSTAT= ' '
SWOWNER = 'brtx2 ' / Licensed owner of software
INPUTFMT= 'FITS ' / Format of file from which image was read
SWMODIFY= 'MaxIm DL Version 5.24 131231 0Y1SR' /Name of software that modified
the image
HISTORY Bias Subtraction (Bias 1, 1530 x 1020, Bin1 x 1, Temp -10C,
HISTORY Exp Time 0ms)
CALSTAT = 'BDF '
HISTORY Dark Subtraction (Dark 2, 1530 x 1020, Bin1 x 1, Temp -10C,
HISTORY Exp Time 25s)
HISTORY Flat Field (Flat Bessel R 1, Bessel R, 1530 x 1020, Bin1 x 1,
HISTORY Temp -10C, Exp Time 3s)
PEDESTAL= -100 /Correction to add for zero-based ADU
ANMISCH = '1 arc sec'
ANMISLE = '400 '
ANMISLG = '1 '
ANM00000= '"
CSTRETCH= 'Medium ' / Initial display stretch mode
CBLACK = 401 /Initial display black level in ADUs
CWHITE = 1022 /Initial display white level in ADUs
thanks sir, chornelis
Sir, i try to use mask on tutorial 1 proper image to my data and it works.
But i will sure for the mask that i should use. Have you any suggestion for me?
thanks sir
Sorry, can you send me more info? Maybe I can look at your images/masks and check for details that might be relevant. Do you have any results to show? Is it working well the subtraction?
https://colab.research.google.com/drive/1_k6JW3yTu7JqaDwODcX15XbZG7o3LTcz#scrollTo=heY9PZP55q6z can you access my code on this site. And my data in this drive sir. https://drive.google.com/drive/folders/1xJcQijzBpfZAOwa0uXC_S6kxPGl7H_ew
Sorry, can you send me more info? Maybe I can look at your images/masks and check for details that might be relevant. Do you have any results to show? Is it working well the subtraction?
actually, know, i am still working to get good reference image. So, i haven't done the subtraction process.
OK, I just checked and I will need access. But whenever you get to the subtraction stage post the results here, then I will look.
OK, I just checked and I will need access. But whenever you get to the subtraction stage post the results here, then I will look.
ok sir, i will try
Sir, can i get your email?
data.pdf sir, this is the document that i try subtraction stage, if you cannot access, please let me know,
my regards, chornelis
Yes I could access it. Is this synthetic data? It looks like the PSF is quite broad and as if every star had the same brightness. What calibration are you applying to your pixel data? Are you converting to photoelectrons or using counts?
yes, this is from the observation process. yes, this PSF is quite broad and every star had the same brightness because this project is try to find out variable star from open cluster. And when we using differential photometry, we find that some star as a variable star, so i want to compare the result with same data but using properimage method. the data using counts.
OK, it appers to me that the mask is quite strange. It seems to be masking out sources. From what I can see, you should have a nice subtraction. Additionally I see some hot pixels in the background, are you applying flat, bias dark and cosmic ray cleaning?
"It seems to be masking out sources", yes and now, i try to find out another way for masking, do you have paper or something about masking process that should I read? Because, it something new for me. For, flar, bias dark and cosmic ray, its done.
OK, why don't you just let the mask out. Try subtracting using the paths:
result = subtract(
ref=ref_path,
new=new_path,
smooth_psf=False,
fitted_psf=True,
align=False,
iterative=False,
beta=False,
shift=False
)
where ref_path
and new_path
are the paths to the images in your local disk.
Or as the readme states:
>>> from properimage.operations import subtract
>>> D, P, Scorr, mask = subtract(ref=ref_path, new=new_path, smooth_psf=False, fitted_psf=True,
... align=False, iterative=False, beta=False, shift=False)
For the case, why don't you just try with the fitted_psf=True
as the readme shows.
Ok sir, thanks for you suggestion. I will try
OK, why don't you just let the mask out. Try subtracting using the paths:
result = subtract( ref=ref_path, new=new_path, smooth_psf=False, fitted_psf=True, align=False, iterative=False, beta=False, shift=False )
where
ref_path
andnew_path
are the paths to the images in your local disk.Or as the readme states:
>>> from properimage.operations import subtract >>> D, P, Scorr, mask = subtract(ref=ref_path, new=new_path, smooth_psf=False, fitted_psf=True, ... align=False, iterative=False, beta=False, shift=False)
For the case, why don't you just try with the
fitted_psf=True
as the readme shows.
RuntimeError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/properimage/operations.py in subtract(ref, new, align, inf_loss, smooth_psf, beta, shift, iterative, fitted_psf) 113 try: --> 114 ref = SI(ref, smooth_psf=smooth_psf) 115 except: # noqa
6 frames
RuntimeError: filter weights array has incorrect shape.
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/properimage/operations.py in subtract(ref, new, align, inf_loss, smooth_psf, beta, shift, iterative, fitted_psf) 115 except: # noqa 116 try: --> 117 ref = SI(ref.data, smooth_psf=smooth_psf) 118 except: # noqa 119 raise
AttributeError: 'str' object has no attribute 'data'
Hello sir, can you help me to explain about the step after get D, Pd, and Scorr? How can we get the flux of transient object or variable stars?
my regards, chornelis
I am very sorry. I just can get back at this. What is the current state?
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)