Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for CHI2 images and absolute thresholding? #440

Open
hjmcc opened this issue Jan 20, 2022 · 10 comments
Open

Support for CHI2 images and absolute thresholding? #440

hjmcc opened this issue Jan 20, 2022 · 10 comments

Comments

@hjmcc
Copy link

hjmcc commented Jan 20, 2022

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 !

@mkuemmel
Copy link
Collaborator

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)?

@marcschefer
Copy link
Member

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.

@mkuemmel
Copy link
Collaborator

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?

@hjmcc
Copy link
Author

hjmcc commented Jan 27, 2022

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

@mkuemmel
Copy link
Collaborator

mkuemmel commented Feb 3, 2022

@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!

@hjmcc
Copy link
Author

hjmcc commented Feb 10, 2022

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
Copy link
Author

hjmcc commented Feb 10, 2022

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

biright-star

@mkuemmel
Copy link
Collaborator

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.

@hjmcc
Copy link
Author

hjmcc commented Feb 10, 2022

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!

@mkuemmel
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants