Repository navigation
Closed
Description
Hello, I am trying to install iraf a few ways and I seem to be running into an issue with a variable called uparm.
To Reproduce
Steps to reproduce the behavior.
- Download
iraf-2.18.tar.gzand follow the installation steps.make testpasses all tests - install the
PESSTOpipeline, using iraf 2.18 installation instructions instead of iraf 2.17 - run a program that uses iraf:
PESSTOFASTSPEC -i EFOSC.2023-11-18T01:36:45.172.fits
and get the resulting error
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/ntt-3.0.1-py3.9.egg/EGG-INFO/scripts/PESSTOFASTSPEC", line 44, in <module>
outputfile = ntt.efoscfastspecdef.efoscfastredu(imglist, _listsens, _listarc, _trace, _dispersionline, _cosmic,
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/ntt-3.0.1-py3.9.egg/ntt/efoscfastspecdef.py", line 207, in efoscfastredu
iraf.onedspec.wspectext(
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/pyraf/iraftask.py", line 834, in __call__
return self.run(*args, **kw)
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/pyraf/iraftask.py", line 373, in run
self._run(redirKW, specialKW)
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/pyraf/iraftask.py", line 1521, in _run
self._runCode()
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/pyraf/iraftask.py", line 1537, in _runCode
self._clFunction(*parList, **kw)
File "<CL script onedspec.wspectext>", line 24, in wspectext
iraf.sections(Vars.output, option = 'fullname', Stdout=Vars.specout)
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/pyraf/iraftask.py", line 834, in __call__
return self.run(*args, **kw)
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/pyraf/iraftask.py", line 374, in run
self._updateParList(save)
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/pyraf/iraftask.py", line 918, in _updateParList
rv = self.saveParList()
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/pyraf/iraftask.py", line 762, in saveParList
rv = self._currentParList.saveParList(filename, comment)
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/pyraf/irafpar.py", line 1109, in saveParList
absFileName = iraf.Expand(filename)
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/pyraf/iraffunctions.py", line 3413, in Expand
outlist.append(_os.path.expanduser(_expand1(word, noerror=noerror)))
File "/Users/danecross/miniconda3/envs/pessto/lib/python3.9/site-packages/pyraf/iraffunctions.py", line 3446, in _expand1
raise IrafError(f"Undefined variable `{varname}' "
pyraf.tools.irafglobals.IrafError: Undefined variable `uparm' in string `uparm$/imlsectis.par'
Expected behavior
A clear and concise description of what you expected to happen.
System details:
- OS: macOS 14.2
- Version 2.18
Additional context
I figure one of the culprits is the version of iraf that the pipeline uses, is there something specific with the uparm directory / values that changed between the versions?
Metadata
Metadata
Assignees
Labels
No labels
Activity
olebole commentedon Apr 9, 2024
There were no changes with the
uparmhandling between 2.17.1 and 2.18; maybe @temuller from PESSTO has an idea?Maybe you could try out 2.17 or 2.17.1 to see whether it is a degradation?
olebole commentedon Apr 10, 2024
I just tried to run the example locally, with IRAF 2.18 from Debian unstable, and python3-pyraf 2.2.1 from Debian testing, and it worked quite well (I got a Python tk/matplotlib exception at the very end indicaing a double destroy, but the pipeline passed).
Therefore, I would assume some problems with your local setup. Specifically,
imlsectisis not part of IRAF or PESSTO,Can you ensure that your environment is clean here? And could you trace this down to an individual IRAF command create a minimal CL or PyRAF code that directly calls IRAF and shows the problem?
danecross commentedon Apr 15, 2024
I am running on a Mac M1 with Sonoma 14.2, and I made a clean conda environment, then followed the installation instructions for 2.18. I think the double destroy occurs for me as well, @temuller tells me this is an unrelated problem.
Here's a minimal example that throws the same error as above for me:
with the fits file in question attached here
olebole commentedon Apr 15, 2024
I can't reproduce it. The code you mention works well for me and produces the ASCII file
ex_1D_spectrum.asci.As I said, the error somehow mentions a file
imlsectis.par; maybe you check your parameter files or IRAF login files for this?olebole commentedon Apr 25, 2024
As I am rather sure that this is not a bug, I will move this to the discussions.