View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Problems with DBCREATE and SPECFIT

Mary Loli Mtz-A. wrote on Mar 25, 2011

Hi, I am learning to use SPECFIT and, how you know, I have to create a file using DBCREATE; it creates a file with the leading 'sf' extension that you use with SPECFIT. Well, when I run SPECFIT, it says:

ERROR: Cannot open file (sfdb/sf)

This is the content of file 'sf':

***********************************************
# Fri 16:47:40 25-Mar-2011
begin HE0507_con
task specfit
components 2
powerlaw
gaussian
powerlaw1 2
1. 0. 1 5. 0.01 1.000000E-4 0
1.2 0.1 5. 0.001 1.000000E-4 0
gaussian2 4
1. 0.1 20. 0.1 1.000000E-4 0
4861. 4855. 4870. 0.1 1.000000E-4 -1
500. 100. 1000. 1. 1.000000E-4 -1
1. 0. 2. 0.001 1.000000E-4 -1

*********************************************************************

I saved the 'sf' file at the 'sfdb' directory . I checked 'sf' file using DBCHECK, but this rutine doesn't set any error. I tried to put all the path since /home/user/spectrum/..... using epar specfit, but doesn't work. Do you know how I can fix this problem.

Greetings,
Mary Loli.

Mike Fitzpatrick wrote on Mar 25, 2011

SPECFIT is part of the STSDAS.CONTRIB package and hasn't been discussed here much, so you might get a better reply from the ST help desk (help@stsci.edu) if there are no other replies here.

The message is a generic one meaning the file couldn't be opened for reading or writing. The task seems to assume the 'initial_fit' and 'final_fit' params have values to specify the files prefixed by 'sf' in the 'database' relative directory. It may be that by not setting values the 'sf' filename can't really be used, otherwise be sure that there is an 'sfdb' subdirectory of the data directory. Hope this helps.

Last post on Mar 25, 2011