Welcome to iraf.net Tuesday, May 21 2024 @ 10:16 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 scopy creating a new file when asked to cobble and merge
   
gdrude
 09/29/2009 08:36PM (Read 1916 times)  
+----
Newbie

Status: offline


Registered: 09/29/2009
Posts: 5
I have been attempting to create a script which trims the edges for each aperture in a multispec fits file. The echelle data I have has incredibly low S/N ratio along the edges. I am attempting to write a script that will go through each aperture and scopy out the region I am interested in and put that aperture into an output file. I will repeat this for each aperture (there are 36 of them) and then move onto the next file. The problem is that it creates the first file just fine, but when I attempt to copy the second aperture into the previous output, it produces a new file. This has been occuring through the standard cl shell as well as the pyraf script I have written. I have merge, clobber,rebin, and verbose set to yes, while renumber set to no.
[code:1:243db83f89]
#! /usr/bin/env pythonimport sys
from getfilecontents import *
from pyraf import irafdef run_scopy(inputfile, outputfile, range):
iraf.noao(_doprint=0)
iraf.onedspec(_doprint=0)

iraf.scopy(inputfile,outputfile,w1=range[0],w2=range[1],\
apertures=range[2],apmodulus=0,format='multispec',\
renumber='no',offset=0,clobber='yes',merge='yes',rebin='yes',\
verbose='yes')def trim_echelle(filelistname,rangefilename):
filelist = getcontents(filelistname)
range_app = getsplitcontents(rangefilename) for range in range_app:
for filename in filelist:
cfilename = filename.strip()
outputfile = filename[:filename.rfind('.fits')]+'.trimmed.fits'
run_scopy(cfilename,outputfile, range)[/code:1:243db83f89]Above is the script I use. It is not pretty yet, I am using this for testing. The range file has 36 lines and three collumns:
starting wavelength ending wavelength apertureThe filelistname is a file containing one file name per line. Thank you for your help. I am sure there is something obvious I am missing, but no amount of googling is helping.Best,
Jerry Rude

 
Profile Email
 Quote
fitz
 09/29/2009 08:36PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Just a guess, but I think you either need to turn the SCOPY 'renumber' parameter on or else turn 'clobber' off. Frank will of course have a more expert opinion.-Mike

 
Profile Email
 Quote
gdrude
 09/29/2009 08:36PM  
+----
Newbie

Status: offline


Registered: 09/29/2009
Posts: 5
[quote:b47e51bca9="fitz"]Just a guess, but I think you either need to turn the SCOPY 'renumber' parameter on or else turn 'clobber' off. Frank will of course have a more expert opinion.-Mike[/quote:b47e51bca9]Thank you for the reply. I ended up hacking together a script to accomplish the task. It is really ugly however and I am to embarrassed to post it. I will play with turning clobber off and on tomorrow. Thank you again for your time.Jerry

 
Profile Email
 Quote
   
Content generated in: 0.13 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login