SourceXtractorPlusPlus icon indicating copy to clipboard operation
SourceXtractorPlusPlus copied to clipboard

Support for CHI2 images and absolute thresholding?

Open hjmcc opened this issue 3 years ago • 10 comments

Dear SE++ developers, thanks for all the hard work.

I have a question, is SE++ able to use CHI2 detection images produced by Swarp? In 'sextractor classic' these images were signalled by adding -THRESH_TYPE ABSOLUTE in the configuration file. I grepped the sources and documentation and couldn't find anything 😰😰😰 .

thanks !

hjmcc avatar Jan 20 '22 16:01 hjmcc

That parameter doe not exist, right. I am not aware we ever discussed this. I'll have a look. If it does not exist it shouldn't be difficult to implement.

Could you provide us with some example data (chi-square image plus SE2 catalog plus SE2 seg image)?

mkuemmel avatar Jan 21 '22 10:01 mkuemmel

I'm not entirely sure what's in those images but we use the detection image to estimate the initial value of flux for model fitting so that could be a problem if doesn't give us a usable flux.

marcschefer avatar Jan 21 '22 11:01 marcschefer

That parameter to make the detection threshold absolute for CHI2 images does not exist yet, and we will implement it for the next version v0.17.

Until then you can:

  • pair the CHI2 detection image with an rms-image all 1.0;
  • set the background to 0.0;

That should result in the intended behaviour.

@hjmcc again, could you give us some example data?

mkuemmel avatar Jan 27 '22 14:01 mkuemmel

Thank you @mkuemmel and @marcschefer for your help!

I put some images from COSMOS2020 (https://ui.adsabs.harvard.edu/abs/2021AAS...23721506W/abstract) in https://exchg.calet.org/hjmcc/sepp/

You can find a subimage of the chi-mean images in there, as well as the same segment of the i-band image. I include an image from the paper showing what the parameters we used in COSMOS2020.

My aim to is to try to run SE++ on the COSMOS2020 data with detection parameters as close as possible to SE2.

Thanks for the hint @mkuemmel , I will try that!

image

hjmcc avatar Jan 27 '22 16:01 hjmcc

@hjmcc I checked you images, the weight image is 1.0 everywhere, hence the detection threshold is absolute as expected for a chi-square image. This zip file: chi2.zip contains the configuration files (ascii and python) for the use case you described. Its kind of structural, so I did not try to put in all the parameters you listed above. It uses the chi-square image as detection and the i image as measurement image. There are some hints how to extend to several measurement images.

Have a look!

mkuemmel avatar Feb 03 '22 10:02 mkuemmel

Thank you, @mkuemmel for the help and posting these scripts!

I tried your config and compared it to a similar config for SE2.0. Seems to work, it detects about ~20% more objects however, as you can see from the check-images (OBJECTS from SE2.0 and SEGMENTATION from SE++). So I understand that the SE++ deblending and splitting algorithm is different from SE2? I will make some more tests. GIF shows (chi2, SE2 and SE++). (We have quite an agressive threshold in SE2.0 to avoid too many spurious sources around the very bright objects in COSMOS.

2022-02-10 10-16-19 gifcask 2022-02-10 10_18_35

hjmcc avatar Feb 10 '22 09:02 hjmcc

For reference, this is what happens near a bright star. It's the same order: chi2, se2, se++. Some tuning still!

biright-star

hjmcc avatar Feb 10 '22 09:02 hjmcc

Some comments from my side:

  • In the first image the SE++ objects seem to be larger and the additional 20% objects are at the faint end. Maybe the min-area is different and/or the weighting of the RMS image (I used absolute weighting).
  • The deblending algorithm is very similar to SE2. Note that starting from 0.16 grouping is on by default.
  • Note that you can set a second core threshold and discard objects with a small number of pixels above that core threshold. This enlarges objects and suppresses false positives around bright extended objects.

On the second image I think I switched background subtraction off, which to me seems to be appropriate for a chi2 image.

mkuemmel avatar Feb 10 '22 09:02 mkuemmel

Thanks again @mkuemmel. I confirm that the minimum area is the same in both cases.

Note that you can set a second core threshold and discard objects with a small number of pixels above that core >threshold. This enlarges objects and suppresses false positives around bright extended objects.

Thanks for the hint. I guess you are referring to these parameters:

The core threshold level

core-threshold-value=0

The minimum pixel area for partitioning

core-minimum-area=0

Activate core threshold partitioning

partition-corethreshold=0

What should I set them to? I couldn't find anything in the documentation...

Cheers!

hjmcc avatar Feb 10 '22 10:02 hjmcc

Set:

  • core-threshold-value to your 'old' detection-threshold;
  • core-minimum-area equal to detection-minimum-area;
  • lower the value for detection-threshold;
  • switch on the partitioning with partition-corethreshold=0

The objects get larger which eliminates the halo objects around bright galaxies. False positives in the field are suppressed by the 'original', high core threshold.

mkuemmel avatar Feb 10 '22 10:02 mkuemmel