pro norh_koshix,rawfile,szfile,frame $ ,imgdir=imgdir $ ,outfile=outfile,rlphdiffile=rlphdiffile $ ,version=version,freq=freq $ ,cenfnl=cenfnl,cenunit=cenunit,size=size $ ,nfrcal=nfrcal,nfrint=nfrint,clcra=clcra,clcrs=clcrs $ ,cendty=cendty,beamcor=beamcor $ ,lpfilt=lpfilt,clgain_sky=clgain_sky,clgain=clgain $ ,cltrim=cltrim,clnega=clnega $ ,jit_as_int=jit_as_int,pro_res=pro_res $ ,ref_frame=ref_frame,ref_nfrcal=ref_nfrcal ;+ ; NAME: ; NORH_KOSHIX ; ; PURPOSE: ; This procedure gives a front-end for synthesizing ; the NORH images from the raw data by the 'Koshix' ; program. ; ; CALLING SEQUENCE: ; norh_koshix,rawfile,szfile,frame ; ; INPUTS: ; rawfile: Raw-data file for synthesizing ; szfile: 'SZ' file corresponding to the raw-data file ; frame: frame ID number to be synthesized ; ; OPTIONAL INPUT KEYWORDS: ; ; *Version ; version: version of synthesizing program. ; Newest if given '-1'. ; '5.1','6.0' '6.1' or '6.2' is available. ; ; *Data ; outfile: input-parameter file for synthesizing ; rlphdiffile: phase-difference-table file ; imgdir: Image-data file name ; ; *Field of View ; size: Image pixel size. Default is 512/1024 for 17GHz/34GHz. ; cenfnl: Position of Sun center relative to the image center ; Default is (0,0). ; cenunit: Unit ID for 'cenfnl' [1: arcsec(default); 2: pixel] ; ; *CLEAN paramters (common) ; nfrcal: Number of frames used for calibration (default 1) ; nfrint: Number of frames used for integration (default 1) ; clcra: CLEAN criterion for (r+l) (default 3000) ; clcrs: CLEAN criterion for (r-l) (default 3000) ; ; *CLEAN paramters ('koshix' only) ; cendty: ; beamcor: ; ; HISTORY: ; Written 1998-05-29 TY ; Modified 1999-6-30 TY for ver6.2 ; Modified 2000-7-25 TY for cenunit ; Modified 2001-1-12 TY for bug print,frame,format ; Modified 2001-3-06 TY for ver6.3 ; ;- if (n_elements(outfile) eq 0) then outfile=curdir()+'/'+'norh_synth_input' if (n_elements(imgdir) eq 0) then imgdir=curdir()+'/' if (n_elements(version) eq 0) then version='-1' if (version eq '-1') then version='6.2' if (n_elements(freq) eq 0) then freq=17 if (n_elements(size) eq 0) then size=512 if (n_elements(cenunit) eq 0) then cenunit=1 else begin case strtrim(cenunit,2) of 'arcsec': cenunit=1 'pixel': cenunit=2 '1': cenunit=1 '2': cenunit=2 endcase endelse if (n_elements(cenfnl) eq 0) then cenfnl=[0,0] if (n_elements(nfrcal) eq 0) then nfrcal=1 if (n_elements(nfrint) eq 0) then nfrint=10 if (n_elements(clcra) eq 0) then clcra=3000 if (n_elements(clcrs) eq 0) then clcrs=3000 if (n_elements(cendty) eq 0) then cendty=[999,999] if (n_elements(beamcor) eq 0) then beamcor=1 if (n_elements(cendtyl) eq 0) then cendtyl=cendty if (n_elements(cendtyr) eq 0) then cendtyr=cendty if (n_elements(lpfilt) eq 0) then lpfilt=0.1 if (n_elements(clgain_sky) eq 0) then clgain_sky=0.02 if (n_elements(clgain) eq 0) then clgain=0.2 if (n_elements(cltrim) eq 0) then cltrim=0.8 if (n_elements(clnega) eq 0) then clnega=1 if (n_elements(jit_as_int) eq 0) then jit_as_int=1 if (n_elements(pro_res) eq 0) then pro_res=1 if (n_elements(ref_frame) eq 0) then ref_frame=frame(0) if (n_elements(ref_nfrcal) eq 0) then ref_nfrcal=nfrint nfrina=1 solr=1.0125 mfrx=n_elements(frame) case 1 of (version eq '5.1') : begin if (freq ne 17) then message,'Sorry, this version only supports 17GHz data' openw,unit,outfile,/get_lun printf,unit,rawfile printf,unit,szfile printf,unit,rlphdiffile printf,unit,0 printf,unit,mfrx printf,unit,format='(10(i6))',frame printf,unit,nfrcal printf,unit,nfrint printf,unit,nfrina printf,unit,clcra printf,unit,clcrs printf,unit,solr printf,unit,clgain_sky printf,unit,clgain printf,unit,cltrim printf,unit,lpfilt printf,unit,clnega printf,unit,cendtyr printf,unit,cendtyl printf,unit,cenfnl printf,unit,jit_as_int printf,unit,pro_res printf,unit,beamcor printf,unit,imgdir close,unit free_lun,unit end (version eq '6.0') : begin if (freq ne 17) then message,'Sorry, this version only supports 17GHz data' openw,unit,outfile,/get_lun printf,unit,rawfile printf,unit,szfile printf,unit,rlphdiffile printf,unit,0 printf,unit,mfrx printf,unit,format='(10(i6))',frame printf,unit,nfrcal printf,unit,nfrint printf,unit,nfrina printf,unit,clcra printf,unit,clcrs printf,unit,solr printf,unit,clgain_sky printf,unit,clgain printf,unit,cltrim printf,unit,lpfilt printf,unit,clnega printf,unit,cendtyr printf,unit,cendtyl printf,unit,cenunit,cenfnl printf,unit,jit_as_int printf,unit,pro_res printf,unit,beamcor printf,unit,size printf,unit,imgdir close,unit free_lun,unit end (version eq '6.1') or (version eq '6.2') : begin if (freq ne 17) then message,'Sorry, this version only supports 17GHz data' openw,unit,outfile,/get_lun printf,unit,imgdir printf,unit,rawfile printf,unit,szfile printf,unit,size printf,unit,cenunit,cenfnl printf,unit,0 printf,unit,mfrx printf,unit,format='(10(i6))',frame printf,unit,nfrcal printf,unit,nfrint printf,unit,clcra,clcrs close,unit free_lun,unit end (version eq '6.3') : begin if (freq ne 17) then message,'Sorry, this version only supports 17GHz data' openw,unit,outfile,/get_lun printf,unit,imgdir printf,unit,rawfile printf,unit,szfile printf,unit,size printf,unit,cenunit,cenfnl printf,unit,0 printf,unit,mfrx printf,unit,format='(10(i6))',frame printf,unit,nfrint printf,unit,nfrcal,ref_frame,ref_nfrcal printf,unit,clcra,clcrs close,unit free_lun,unit end endcase return end