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 

Maxim DL 5.02 and CASELO keyword compatibility script READY

 
Post new topic   Reply to topic    iraf.net Forum Index -> Sources
View previous topic :: View next topic  
Author Message
sebastian
Active IRAF User


Joined: 21 Mar 2007
Posts: 45

PostPosted: Fri Aug 07, 2009 4:04 am    Post subject: Maxim DL 5.02 and CASELO keyword compatibility script READY Reply with quote

Hi, finally here it is the correct version of the script.

Simply, it edits the image headers to ensure Maxim DL compatibility.
It will work for images taken at Casleo 2.15m telescope using the Roper
1300b direct CCD camera or any image with similar headers.
The problem arises when trying to use Maxim DL software on images that have the DATE-OBS key not with Maxim's format. This format does not comply with the DATE-OBS key expected by Maxim as aaaa:mm:ddThh:mm:ss
After correcting this, you will be able to perform astrometry and photometry
on your images (or whatever you want) with Maxim.
The script looks for either .fit or .fits images.

It has to be used in two steps, option 1 and 2.
option 1 creates needed files.
The script creates to separate files with UT and DATE-OBS values for
all images, then, a "T" is attached to the UT values and these two
files are opened in a text editor.(in this case gedit is used)
The application could be changed if needed, just by changing
the name for the prefered application.
The user is asked to delete the space between the columns in the output file
created called salida.
Thus each line in the "new" date_list file should be like

year:month:dayThh:mm:ss
or
2009:07:08T01:08:00

Save this file again and run option 2.
option 2 The script edits the headers.



I hope that it would be useful.
I have to thanks fitz for his remarkable suggestion.
cheers.

The code:
Code:

procedure Maxim_header (start)
#version 1.0
int start     {prompt="Please select to create the needed files, e.g, 1st time,(1) or to EDIT Image Headers, 2nd (2)?: "}

struct  *list

begin
string s1
string imlist
struct s2
int ss
ss=start
print("........................................................................................................... ")
print("Maxim Header ver 1.0 " )
print("This script will correct the DATE-OBS keyword")
print("in a series of images in order to make them 'readable'")
print("by the Maxim DL software")
print("This is a known issue in direct images taken with the Roper 1300B CCD")
print("camera at CASLEO. The keyword DATE-OBS doesn't have the apropiate")
print("yyyy:mm:dddThh:mm:ss format. This script corrects that.")
print("")
print("............................................................................................................")


 
 
 
del("ut_list")
del("date_list")
del("ut_list_T")
del("final")


switch(ss) {
case 1: {            #It creates the list of images to process, either .fit or .fits
   !ls *.fits >"imlist"
   !ls *.fit >> "imlist"
   print("")
   print("....................................................................")
   print(" Generating date_list and ut_list_T files")
   print("....................................................................")
   print("")
   print("")
   print("")

   hselect("@imlist","DATE-OBS",yes, > "date_list")
   hselect("@imlist", 'UT',yes, > "ut_list")
   list="ut_list"
   while (fscan(list,s1) !=EOF){
   files("T"//s1 ,>>"ut_list_T")
      }
   !paste date_list ut_list_T > salida    #It creates the output file needed for option #2
#**   
!gedit salida & #It calls gedit, change it if needed                 
   print("............................................................")
   print("Save your file as salida by deleting")
   print("the space between the two columns")
   print("in order to have in each line the  yyyy::ddThh:mm:ss format")
   print("Please run the script again but selecting option 2")
   print("this will automatically edit your image headers")
   print(".............................................................")
   print("******")
   print("DONE")
   print("******")
          }      
case 2: {

      print("..................................................................................................")   
      print("Image headers will be corrected to ensure Maxim DL compability")
      print("...............................................................................................")
      print("")
      print("")
      print("")
      print("")
      if(access("salida")){   #Hediting image headers
      !paste imlist salida > final
      list = "final"
      while (fscan (list, s1, s2) != EOF) {
      hedit (s1, "DATE-OBS", s2, add+, up+, ver-)
                        }
         del("salida")
         print("*............................................................................*")
         print("The Image headers have been edited SUCCESFULLY")
         print("EXITING NOW")
         print("*..........................................Maxim_header_v1a.*")         
               }
      else{
         print("")   
         print("................................................")
         print("File salida not present")
         print("Did you first run option #1?")
         print("................................................")
         }
                              

   
   
   

   }
default:
print("Please select option #1 or #2")
      }
      
      
end
[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Sources 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.13 seconds