Piff
                                
                                
                                
                                    Piff copied to clipboard
                            
                            
                            
                        Strange PSF fitting
Hi! I'm trying to use PIFF to model the psf of a large FOV images. The images are from a QHY411 and have 14200x10650 pixels, I'm cropping the image to half of the image in order to speed up the process. The pixels scale is 0.22 and the catalog that I'm using is only with the detected stars which are 50 times above the sky value (13 stars).
Here is the config file that I'm using (changing between mean and Basispolunomial for interp):
input:
    image_file_name: /lab/amadrigal/crop_303413.fits
    cat_file_name: /lab/amadrigal/cat.fits
    x_col: x
    y_col: y
select:
    # Specifying a seed makes the choice of reserve stars deterministic.  
    # Typically set on the command line, since you'd want this to be different for each image.
    seed: 1234   
        
    # Remove >3 sigma outlier in the HSM-measured size.
    # HSM (Hirata, Seljak and Mandelbaum) is an adaptive moment algorithm for measuring size and shapes, 
    # which is pretty stable and is included with GalSim.
    hsm_size_reject: 3   
    min_snr: 50
psf:
    model:
        type: PixelGrid
        scale: 0.30
        size: 17
    interp:
        type: BasisPolynomial
        order: 3
    outliers:
        type: Chisq
        nsigma: 5.5
output:
    file_name: piff_solution.piff
I don't understand the result. When I put mean in the interp, the result is near to be normal (see pic 1). But when I change to basispolynomial the result is a rotated square (see pic 2).
psf_interp_mean.pdf psf_interp_BasisP.pdf
In both cases, there is a square pattern. I know I'm something wrong but I don't know what. Maybe the solution could be add a weight map but, how to generate it?
Thanks a lot for your work!
If you only have 13 stars, then order 3 polynomial interpolation is going to be very poorly constrained. That has 10 free parameters for each pixel in the PixelGrid. There's no way that could be expected to work well.
I understand that the parameters are no the best. Apart from the DES paper, is there another document where find the explanation of all the parameters? Thanks again!
http://rmjarvis.github.io/Piff/_build/html/index.html
Hi again. I came with another question. What is the reason to PIFF to show the following warning message?
"Failed initializing star at galsim.PositionD(3704.6759352181866,61.61893335106428). Excluding it. 2023-07-21 14:31:02,178 - [WARNING] piff: Failed initializing star at galsim.PositionD(3704.6759352181866,61.61893335106428). Excluding it. -- Caught exception: Derived classes must define the initialize function"
The image is 5680x4260 pixels. I received this warning for all the stars even if they are in the center of the image.
I'm testing the optical model.
Thanks again!
I have no idea what you are doing wrong to get that error message. It's not something that should happen if you are using the PixelGrid model as you mentioned above. If you haven't figured it out yourself yet, please provide a small test case that reproduces it, and I'll look into it.