Closed PKSejake closed 1 year ago
Hi Katlego,
The routine that decides where to extract traces from longslit data is here:
Maybe it could be as simple as making some of the parameters this routine takes adjustable via command line arguments - in a similar way to the threshold parameter. If you add something that fixes your problem, please make a pull request and I'll merge it in.
Alternatively, if you can send me an archive with your data in it, I can fiddle around and fix the problem for this case.
Cheers Matt
Ok - I've checked in an update to the master branch that should help, I think - please give it a go to make sure it's doing what you want and let me know. I don't think you should need to change the default threshold value.
The fix should just improve the peak finding for locating the object traces in longslit data - the problem in your data is a large gradient across the image which was throwing it off. I've added a filtering step that flattens the background (only when it's looking for object traces) that should fix it.
If this works for you, I'll make a new tagged release after doing a bit more testing on data I have.
Cheers Matt
Hi Matt,
I'm reinstalling the pipeline, but I'm getting an error about astLib.
ERROR: Command errored out with exit status 1: /Users/preciouskatlegosejake/opt/anaconda3/envs/rss_moss_env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/v2/tqzjtbh94c3cfh9hk88500fh0000gn/T/pip-install-u9xmqawz/astlib_92ef139cda93416eb969e6360fe2dab9/setup.py'"'"'; file='"'"'/private/var/folders/v2/tqzjtbh94c3cfh9hk88500fh0000gn/T/pip-install-u9xmqawz/astlib_92ef139cda93416eb969e6360fe2dab9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/v2/tqzjtbh94c3cfh9hk88500fh0000gn/T/pip-record-mj_856pk/install-record.txt --single-version-externally-managed --compile --install-headers /Users/preciouskatlegosejake/opt/anaconda3/envs/rss_moss_env/include/python3.6m/astLib Check the logs for full command output.
Regards Katlego
Guessing you have a Mac. See:
https://astlib.readthedocs.io/en/latest/usage.html#installation-on-recent-versions-of-macos
For some reason, fairly recent Macs pretend they have GCC when they don't.
Hi Matt,
The changes you made worked. I can now get the spectrum for my target. But I still had to reduce the longslit-threshold to 0.5.
Regards Katlego
Melissa Morris has added a new -F flag that allows one to specify slit (or object) locations manually - perhaps that may work for your case also? This uses the new -F flag, and is in the master branch.
Hi Matt.
How can I modify the RSS MOSS pipeline code to extract the spectrum at a specific pixel position? I run the pipeline on the G4Jy source, and no matter how much I decrease the longslit-threshold, there is still no slit defined for my target. Below is the screenshot of the fits image with the slits regions. My target is just underneath the slit 6 region.
Regards Katlego