Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IMFORT / imopen : fits vs. imh

 
Post new topic   Reply to topic    iraf.net Forum Index -> Sitemail Archives
View previous topic :: View next topic  
Author Message
Guest
Guest





PostPosted: Fri Aug 26, 2005 2:30 pm    Post subject: IMFORT / imopen : fits vs. imh Reply with quote

Dear IRAF-team,

since I have to modify a Fortran-script, which makes use of imfort and I
am admittedly not too famliliar with Fortran, I hope that you could give
me a hint, whether my aim is easily incorporated. If not, never mind.

The current version of the code can only handle imh-spectra, but I would
like to use it basically on spectra in fits format, without needing to do
an imcopy or likewise beforehand. I guess the basic change is in the
imopen-step.

Below is the beginning part of the respective subroutine.

Thanks for your time and
best regards,
Andreas Koch

c****************
SUBROUTINE SPTIN (FNAME,NCOEFF,AA,ITYP)
!
! This subroutine is given the filename of a spectrum which should
! already exist. It finds the header, determines the file's size,
! prints out a description, opens the direct access file, reads the
! data into a common block, and returns the wavelength coefficients
! ITYP is returned as -99 if error opening the file occurs
! This version is for IRAF files
!
CHARACTER DATE*24, UT*10
character*80 errmsg
CHARACTER*40 FNAME
CHARACTER*20 LABEL,crv
integer im,ier,axlen(7),naxis,dtype
integer*2 sbuf(4096)
DIMENSION AA(Cool
COMMON /CTFXWV/NX,DATA(4096)
COMMON/OBJ/LABEL
C
C First set default values for parameters
C
ITYP=4
NY=1
BSCALE=1.
BZERO=0.
NCOEFF=2
NBTPX=4
NYREC=1
C
C Open File (read access only).
C
call imopen(fname,1,im,ier)
if(ier .ne. 0) then
call imemsg(ier, errmsg)
write(6,245)errmsg
245 format(' Error: ',a80)
ityp=-99
return
endif
C

--
*****************************************************
* Andreas Koch *
* Astronomical Institute of the University of Basel *
* Venusstr. 7 *
* CH-4102 Binningen *
* Switzerland *
* Tel. +41 61 2055 432 *
* Fax +41 61 2055 455 *
* http://www.astro.unibas.ch/~koch *
****************************************************


Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
Guest
Guest





PostPosted: Fri Aug 26, 2005 9:30 pm    Post subject: IMFORT / imopen : fits vs. imh Reply with quote

Hi Andreas,
Sorry, but the IMFORT interface can only handle imh images.
To use FITS you would need to rewrite parts of the program to use
something like the FITSIO interface.

Regards,
Mike Fitzpatrick



Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Sitemail Archives All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.53 seconds