mattyowl / RSSMOSPipeline

Pipeline for reducing both longslit and multi-object spectroscopic data from the Robert Stobie Spectrograph on SALT.
https://rssmospipeline.readthedocs.io
GNU General Public License v3.0
4 stars 2 forks source link

Labelling unmarked streaks #18

Closed nechnotick closed 3 years ago

nechnotick commented 3 years ago

Hi Matt,

Hope that you are well.

The pipeline seems to have trouble picking up slits that are of interest to us and we were wondering if there was a way to highlight these, as some of them can be spotted with an unaided eye?

As always your help is greatly appreciated.

Regards, Neo

mattyowl commented 3 years ago

Hi Neo,

Have you played with the -T switch for rss_mos_reducer? That sets the detection threshold (in sigma) for the algorithm that looks for traces. You can try setting it to a lower value and see if that helps.

Cheers Matt

nechnotick commented 3 years ago

Hi Matt,

I had already set the threshold to 1 for the targets in question.

Regards, Neo

mattyowl commented 3 years ago

Ok, well the routine that finds the object traces is here:

https://github.com/mattyowl/RSSMOSPipeline/blob/d01661f0a252143c4c5058ea7eb43c52dfee78ad/RSSMOSPipeline/RSSMOSTools.py#L676

Maybe you can take a look at it and tweak it and/or figure out why it isn't picking up the objects you want? It's a very short bit of code.

You don't need to run this in the pipeline to see what it does - you can write a python script and just feed it one of your image file names.

Cheers Matt

nechnotick commented 3 years ago

Tweaking the numbers in the aforementioned code does not yield any change to the output. Is there another way around this?

Neo

mattyowl commented 3 years ago

That's the specific bit of code that identifies the spectral traces. So there's nothing else to tweak, if you're tried different things like e.g. reducing minTraceWidth, minSlitHeight, thresholdSigma, etc. and tried fiddling with halfBlkSize. It would be possible to directly dial in the coords of the thing you want to extract. by adding another dictionary to slitsDict with the coord range you want to cover for your mystery object (add on line 747 - that's obviously a hack, but may get you to see if there's any signal there to be extracted).

Otherwise... you can stick your data somewhere where I can grab it, and I'll take a swing at it when I get the chance (maybe later this week).

Cheers Matt