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

Satellite/Airplane streak detected as > 200 sources in single sub-image #433

Open
simonegarrappa opened this issue Apr 10, 2024 · 8 comments

Comments

@simonegarrappa
Copy link
Collaborator

Catalog: /marvin/last/data/temp/LAST.01.05.01/2024/03/05/proc/021913v0/LAST.01.05.01_20240306.022013.877_clear_OP313_004_001_016_sci_proc_Cat_1.fits

SubImage:
/marvin/last/data/temp/LAST.01.05.01/2024/03/05/proc/021913v0/LAST.01.05.01_20240306.022013.877_clear_OP313_004_001_016_sci_proc_Image_1.fits

Maybe a known issue, but giving some info about it. The satellite streak in the image is detected as 264 single sources in this case, all with MAG ~ 16 (see histogram here)

satellite_streak_maghisto

I'm adding a plot here of RA and Dec of all sources in the catalog

satellite_streak_map

The flags raised for some of these sources are:
'BiasFlaring', 'DarkHighVal', 'DarkLowVal', 'LowRN', 'NonLinear', 'Saturated', 'Xtalk'

45% of these sources have no flags in the catalog.

@EastEriq
Copy link
Collaborator

Is the current pipeline using anything at all to detect streaks? I myself made imProc.mask.maskTracks for PTF. It is far from perfect, but good to some extent.

@EranOfek
Copy link
Owner

EranOfek commented Apr 10, 2024 via email

@EastEriq
Copy link
Collaborator

Seems I'm not far from that, at least on random data:

>> AI.Image=20*imUtil.art.createSegments([1700,1700],[322,233;98,0],[54,11;145,211],'width',0.5) + 50*rand(1700,1700);
>> imProc.background.background(AI);
>> tic;imProc.mask.maskTracks(AI);toc
Elapsed time is 0.606075 seconds.
>> tic;imProc.mask.maskTracks(AI);toc
Elapsed time is 0.057231 seconds.
>> tic;imProc.mask.maskTracks(AI);toc
Elapsed time is 0.049659 seconds.

on last11e. Maybe the first call takes longer because the mask is created anew, I could do a more serious analysis.

@EranOfek
Copy link
Owner

EranOfek commented Apr 11, 2024 via email

@EastEriq
Copy link
Collaborator

It may be data dependent & a matter of tuning parameters. I said it is not perfect, YMMV.
On Simone's image I get timings of the order of 300ms on calls beyond the second. The longer time for the first call may be because of JIT compilation.

>> cd /marvin/LAST.01.05.01/2024/03/05/proc/021913v0
>> AI=AstroImage.readFileNamesObj('LAST.01.05.01_20240306.022013.877_clear_OP313_004_001_016_sci_proc_Image_1.fits');
>> AI=imProc.background.background(AI);
>> tic;imProc.mask.maskTracks(AI);toc
Elapsed time is 0.287869 seconds.

It more or less catches the track, I quite believe that it would improve if tuning the arguments:
imagesc(AI.MaskData.findBit('Streak'));axis xy

image

@EastEriq
Copy link
Collaborator

In fact I suspect that a considerable time in the function goes not for the detection of the streak but for the generation of the pixellated image of the segments in the Mask matrix, which can perhaps be made more efficient. I would profile it, but as of now euler is clogged by your 23 matlab processes...

@EranOfek
Copy link
Owner

euler has 128 processors and 256 threads...

@EastEriq
Copy link
Collaborator

I don't know what is with euler but I'm not holding my breath to get responsiveness.
Actually profiling on my desktop and on random data shows that 1/3 of the time is spent only in parsing arguments for hough and houghpeaks which is entirely superfluous, so there is certainly room for improvement.
image

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