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

Long-slit reduction #8

Closed nechnotick closed 3 years ago

nechnotick commented 3 years ago

Hi there,

I am having trouble reducing some long-slit data that I have at my disposal. Upon installing the pipeline and running it, I get an empty folder titled reduced and a blank log file within my working directory. This is after running the "rss_mos_reducer product reduced all" procedure from my directory.

Your assistance would be greatly appreciated.

Sincerely, Neo Namane

mattyowl commented 3 years ago

Hi Neo, what does the log file say? To tell if there is a problem or not, I'd need to know what error messages you get, if any.

Cheers Matt

On 2020/09/29 20:22, Neo Namane wrote:

Hi there,

I am having trouble reducing some longslit data that I have at my disposal. Upon installing the pipeline and running it, I get an empty folder titled reduced and a blank log file within my working directory. This is after running the "rss_mos_reducer product reduced all" procedure from my directory.

Your assistance would be greatly appreciated.

Sincerely, Neo Namane

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mattyowl/RSSMOSPipeline/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBC6VZ4FPG6LYKJMZ4FWU3SIIQXRANCNFSM4R6EMNXQ.

nechnotick commented 3 years ago

Hi Matt,

Thanks for the reply. The log file's (rss_mos_reducer-2020-09-30T18:22:40.878100.log) contents are as follows:

2020-09-30 18:22:40,878 - RSSMOSPipeline - INFO - started: 2020-09-30T18:22:40.878219 2020-09-30 18:22:40,878 - RSSMOSPipeline - INFO - parameters: Namespace(excludeMasks='', extensionsList='all', iterativeMethod=False, longslitThreshold=2.0, maskName='all', rawDir='raw', reducedDir='reduced', skipDone=False, subFrac=0.8, threshold=0.1) 2020-09-30 18:22:40,878 - RSSMOSPipeline - INFO - Reading image headers (cache file location: raw/imageInfo.pkl).

Many thanks, Neo

mattyowl commented 3 years ago

I'm going to hazard a guess it didn't read any images, i.e., that you fed in a path to a directory that didn't contain images.

What are the contents of your 'raw' dir?

nechnotick commented 3 years ago

The 'raw' directory contains the long-slit fits files in question.

mattyowl commented 3 years ago

Are you sure?

If you type ls raw what do you see?

I know that if I run

rss_mos_reducer raw reduced list

and the raw directory does not contain any FITS images, then I see

2020-10-01 07:01:25,549 - RSSMOSPipeline - INFO - started: 2020-10-01T07:01:25.549949
2020-10-01 07:01:25,550 - RSSMOSPipeline - INFO - parameters: Namespace(excludeMasks='', extensionsList='all', iterativeMethod=False, longslitThreshold=2.0, maskName='list', rawDir='raw', reducedDir='reduced', skipDone=False, subFrac=0.8, threshold=0.1)
2020-10-01 07:01:25,550 - RSSMOSPipeline - INFO - Reading image headers (cache file location: raw/imageInfo.pkl)
Found 0 masks:`
nechnotick commented 3 years ago

screen

mattyowl commented 3 years ago

The pipeline operates on the contents of the product directory - you should use the link under Product Data in the emails you get from SALT to get that. This is mentioned in Step 1 under 'How To Run' in the README file (shown on the GitHub front page).

nechnotick commented 3 years ago

Hi Matt,

Sorry for my misunderstanding, I have since ran the pipeline on the product directory provided to me and received the following log file:

2020-10-03 13:24:45,660 - RSSMOSPipeline - INFO - started: 2020-10-03T13:24:45.660658 2020-10-03 13:24:45,660 - RSSMOSPipeline - INFO - parameters: Namespace(excludeMasks='', extensionsList='all', iterativeMethod=False, longslitThreshold=2.0, maskName='all', rawDir='product', reducedDir='reduced', skipDone=False, subFrac=0.8, threshold=0.1) 2020-10-03 13:24:45,660 - RSSMOSPipeline - INFO - Reading image headers (cache file location: product/imageInfo.pkl) 2020-10-03 13:24:46,135 - RSSMOSPipeline - WARNING - Skipping mask 'xmmlss 1635254_PL0200N001' as no wavelength calibration reference model currently exists. 2020-10-03 13:24:46,135 - RSSMOSPipeline - INFO - Use rss_mos_create_arc_model to make a reference model and then re-run. 2020-10-03 13:24:46,136 - RSSMOSPipeline - INFO - arc files list: ['product/mbxgpP201911030059.fits'] 2020-10-03 13:24:46,136 - RSSMOSPipeline - WARNING - Skipping mask 'xmmlss 0826283_PL0200N001' as no wavelength calibration reference model currently exists. 2020-10-03 13:24:46,136 - RSSMOSPipeline - INFO - Use rss_mos_create_arc_model to make a reference model and then re-run. 2020-10-03 13:24:46,136 - RSSMOSPipeline - INFO - arc files list: ['product/mbxgpP201911030068.fits', 'product/mbxgpP201911030077.fits'] 2020-10-03 13:24:46,136 - RSSMOSPipeline - WARNING - Skipping mask 'xmmlss 0577714_PL0200N001' as no wavelength calibration reference model currently exists. 2020-10-03 13:24:46,136 - RSSMOSPipeline - INFO - Use rss_mos_create_arc_model to make a reference model and then re-run. 2020-10-03 13:24:46,136 - RSSMOSPipeline - INFO - arc files list: ['product/mbxgpP201911030068.fits', 'product/mbxgpP201911030077.fits']

The contents of the product folder are: data

mattyowl commented 3 years ago

It's telling you it doesn't have models for doing the wavelength calibration using whatever arc/grating/combo that you are using. It tells you to use rss_mos_create_arc_model to make one.

Read the README.md file - it's contents are displayed on the GitHub front page: https://github.com/mattyowl/RSSMOSPipeline. This gives a list of grating/arc combos that are currently included. You can also check the data/modelArcSpectra directory.

If you're struggling to make an arc model, please provide me with your data and I can take a look when I get the chance.

nechnotick commented 3 years ago

Hi Matt,

I need clarity regarding the instructions that present themselves when running rss_mos_create_arc_model mbxgpP201911030068.fits. How do I record approximate pixel coordinates using the plot window?

Many thanks, Neo

mattyowl commented 3 years ago

The plot window shows coordinates at the lower right (on my machine - may depend on the matplotlib backend, I guess) - i.e., x and y coords of where the mouse pointer is pointing. You just need to write down the wavelength (angstroms) and the x-coord of the centre of the corresponding line in the arc spectrum (integer coords are fine - the code will actually use these rough coords to properly find line centroids when it creates the actual wavelength calibration model). You then put these in a text file, and re-run the rss_mos_create_arc_model command as per the instructions shown on screen.

I appreciate this is a bit clunky but for me it takes < 30 min to make a new reference model, which I do rarely, so I've not put any effort into making this any slicker.

What arc/grating/binning set up are you using? I am happy to do this for you (if it's not 9 million different combinations) if you can get some of your data to me. It's also possible I can tweak things to use some of the existing arc models with different binning (depends on what your set up is).

nechnotick commented 3 years ago

Thanks, Matt. I have sorted out my issue.