I ran photometry on an image sequence in which the first image had a saturated target. The resulting measurements file indicated the target was saturated in every image which was not the case. I tried downgrading to ver 3.2.0 from a recent upgrade to 3.3.1 and still have the problem.
I have tried to create the simplest demonstration I can for this problem. I have placed a set of two images, an aperture radec file and the Measurements.txt results I get at this link. I also included an image of my measurements settings. Basically, I am asking AIJ to position the apertures based on RA/DEC. I have been using AIJ for some time - long enough to recognize that I have somehow gotten one of the many settings wrong. However, I am stumped and would welcome any suggestions. Here are the steps to reproduce: 1) Open the 190721_0550 image (not in a sequence). Import the apertures from the radec file. Perform photometry with the settings shown in the MeasurementsSettingCapture.JPG image leaving the apertures as they were imported. Note saturated is correctly 63764 and Peak_T1 is the same. 2) Close the image window and open another with image window on 190721_0584. Again import the radec file and perform photometry as before. Note saturated is zero and Peak_T1 is 23796. 3) Now close the image window and repeat steps 1 and 2 except during step 2 leave the image window open and pick File->Open Image in this Window to get the 190721_0584 image. Still import the radec file again for the second image so you can see the apertures are placed at the correct spots. The results for the 2nd image 190721_0584 is that Peak_T1 is that from the 1st image and not 23796. This shows up in Saturated and many other values for the second image are changed. regards, Cliff
Cliff Kotnik
AAVSO KCLA |
Administrator
|
Hi Cliff,
I've looked at this for a while now and can't figure out what is going wrong when loading your fits images into an existing image display window. In fact the problem is fairly easy to see. Open the first image into a new AIJ window, and then replace that image in the same window as you described below (or just drag and drop a new image into the existing image display). Then role the mouse around and look at the peak counts in the box above the image and values from the original image will be displayed. The confusing part is that all of the test FITS images I have open with no problem into an existing window with the pixels values reported from the new image as expected. I can however see the problem with the two images you sent. I looked at the fits headers trying to see a difference that might cause the problem, but had no luck. The bottom line is that this must be some odd AIJ bug that I can't pin down (already spent several hours trying to debug it). I think there are a couple of ways to work around this (1) open both images as a sequence into a stack (2) work from two separate image windows (photometry on both will go into the same measurements table. Will one of those workarounds solve the problem at the moment? What software was used to originally create the fits files. I think it is Maxim DL and Pinpoint for the plate solution, based on the header info. Is that correct? Karen P.S. If other AIJ users see the same problem, please let me know here. I need more sources of files to debug what is going wrong. |
Karen,
With all the balls you have in the air I really appreciate you looking into this so quickly. I did not go into the details of how I arrived at this simplified example. In fact I ran photometry of an image sequence of 332 images and the blue filter image in my simplified example was the first processed. The measurements that resulted indicated all 332 were saturated. If you create an image sequence with the two images in my example you will see the same behavior. I just wanted to make it as simple as possible and so removed the image sequence part. Regarding the synthesis of the images, they are from the AAVSO's AAVSOnet for a project requested by Josh Pepper. For these images, the camera is a CMOS camera under automated control of ACP - hence MaxIm DL controls the camera and pinpoint does the plate solving. Then, the science and calibration images are transferred to a central Linux computer where a custom IRAF pipeline applies the calibration frames. If you would like more detail on the IRAF processing I would need to get with Arne Henden which I am happy to do. Doing a fast, efficient processing of hundreds of images on my local machine is what makes AIJ so special for me. I am more than willing to work to get this resolved. Cliff
Cliff Kotnik
AAVSO KCLA |
I have what I hope is a clue.
Looking at the FITS header it seems the values of BZERO and BSCALE are uncommon values. I wrote a little python program that read the two files in and wrote them back out. As I understand it, the scaling factor and zero point are removed and the data are in signed floating point rather than unsigned integer in the output file. When I perform your simple test with using the mouse to see the peak value interactively and when I perform photometry on an image sequence the problem is not present. An updated ZIP of my example directory is here. The rewritten files are the two with rescaled_ prepended to the name. In addition I saved the FITS headers to text files for each image. You can see that BITPIX, BSCALE and BZERO are the difference. I hope this helps, Cliff
Cliff Kotnik
AAVSO KCLA |
Administrator
|
Hi Cliff,
This is very helpful debug information. I'm not sure how to accommodate those unusual BZERO and BSCALE values in AIJ with a quick fix. We are in the process of integrating a more standard fits file reader into AIJ. I am hoping that will correct this problem, but it's not something I can complete in the next couple of weeks. The new reader will also support .fz compressed files, so I'd rather focus on that as possible fix for this problem too. Would you be able to run all of your files through your python script for the current project and then run photometry in AIJ? Then maybe I can integrated the new fits reader into AIJ in a couple of months and retest your files (I've saved them with my batch of fits files that have been problematic for AIJ). Thanks again so much for providing this additional debug information. I am hoping you can move forward with your fix since that appears to solve the problem in my testing here. Karen |
Karen,
Sure I run them through the script. I will make that AAVSOnet team aware that there is something going on with their images and AIJ and that there is this workaround. Regards, Cliff
Cliff Kotnik
AAVSO KCLA |
Administrator
|
Thank you!
On 8/9/2019 6:42 AM, clkotnik [via AstroImageJ] wrote:
Karen, |
Free forum by Nabble | Edit this page |