Code Monkey home page Code Monkey logo

Comments (4)

bhilbert4 avatar bhilbert4 commented on August 17, 2024

How do we deal with segmentation maps when using extended sources (i.e. small stamp images from fits files)? Currently the code simply assigns all pixels in the stamp image as part of the same single source. This may be ok for small stamp images of single objects, but what about the case where a large mosaic is input, or a stamp image with multiple sources? In this case we may want to do some kind of source detection.

As a first try, use photutils:
from photutils import detect_threshold
threshold = detect_threshold(data, snr=3.)

This detects all pixels with signal 3-sigma above background, where it first determined the background level and rms. So what baout the mosaic image we have where background is 0 except for the sources? The calculated background sigma probably won't be correct here...

Will probably need some quality checking for this case.

from mirage.

bhilbert4 avatar bhilbert4 commented on August 17, 2024

For the case of the mosaic image I have, in which the background is exactly 0 and the only signal in the image comes from sources, detect_threshold does not work well. The returned segmentation map has no sources in it.

But when I create the image using detect_sources, the returned segmentation map looks great.

from photutils import detect_sources
threshold2 = detect_sources(data,1e-5,8)
This says that in order for something to be declared a source, it must have at least 8 connected pixels with signals higher than 1e-5.

Maybe the best approach is both. First try detect_threshold. If the returned map has no sources, then try detect_sources. Or the opposite: try detect_sources with the wide open parameters I used above. If the resulting segmentation map comes back with all pixels set to a single source, then try detect_threshold.

from mirage.

bhilbert4 avatar bhilbert4 commented on August 17, 2024

Latest fix (pull request #11) now has segmentation maps being successfully created when various catalogs are used in conjunction with one another. Sidereal observation was tested, as well as non-sidereal. Still need to test sidereal observation with non-sidereal objects in the FOV. That mode uses the same code as the non-sidereal case, so everything should be fine.

from mirage.

bhilbert4 avatar bhilbert4 commented on August 17, 2024

Segmentation maps now appear all to be consistent. There will always be some uncertainty in the case of extended targets. If pixels where the source does not land are zeroed out then the segmentation map should be a faithful reproduction of the right pixels. If however the non-source pixels contain background or readnoise, then it may be that all pixels in the image are flagged as part of an object.

from mirage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.