pro norh_dirtymap1,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,clcrfac=clcrfac $ ,cendty=cendty,beamcor=beamcor,restoration=restoration $ ,ref_frame=ref_frame,ref_nfrcal=ref_nfrcal ;+ ; NAME: ; NORH_DIRTYMAP1 ; ; PURPOSE: ; This procedure gives a front-end for synthesizing ; the NORH images from the raw data by the 'DIRTYMAP1' ; program. ; ; CALLING SEQUENCE: ; norh_hanaoka,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.0', '5.1', '6.0', '6.1' or '6.2' ; is available for 'hanaoka'. ; ; *Data ; outfile: input-parameter file for synthesizing. ; Defarult is 'norh_synt_input' ; imgdir: Image-data file or directory name ; rlphdiffile: phase-difference-table file ; freq: observation frequency, 17 or 34 ; ; *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 ; nfrint: Number of frames used for integration ; clcra: CLEAN criterion for (r+l) ; clcrs: CLEAN criterion for (r-l) ; ; *CLEAN paramters ('hanaoka' only) ; clcrfac: ; ; *Others ; cendty: ; beamcor: ; restoration: ; ; 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 ; Modified 2007-11-27 MS based on norh_hanaoka ; ;- 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=1 if (n_elements(clcrfac) eq 0) then clcrfac=0.01 if (n_elements(cendty) eq 0) then cendty=[999,999] if (n_elements(beamcor) eq 0) then beamcor=1 if (n_elements(restoration) eq 0) then restoration=1 if (n_elements(ref_frame) eq 0) then ref_frame=frame(0) if (n_elements(ref_nfrcal) eq 0) then ref_nfrcal=nfrint mfrx=n_elements(frame) case 1 of (version eq '5.0') : begin if (freq eq 17) then begin if (n_elements(clcra) eq 0) then clcra=-0.5 if (n_elements(clcrs) eq 0) then clcrs=-0.15 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,clcra printf,unit,clcrs printf,unit,cendty printf,unit,cenfnl printf,unit,beamcor printf,unit,restoration printf,unit,imgdir close,unit free_lun,unit endif else begin message,'Sorry, this version only supports 17GHz data' endelse end (version eq '5.1') or (version eq '6.0') : begin if (freq eq 17) then begin if (n_elements(clcra) eq 0) then clcra=-0.5 if (n_elements(clcrs) eq 0) then clcrs=-0.5 if (n_elements(size) eq 0) then size=512 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,clcra,clcrs printf,unit,clcrfac printf,unit,cendty printf,unit,cenunit,cenfnl printf,unit,beamcor printf,unit,restoration printf,unit,size printf,unit,imgdir close,unit free_lun,unit endif else begin if (n_elements(clcra) eq 0) then clcra=-1. if (n_elements(size) eq 0) then size=1024 openw,unit,outfile,/get_lun printf,unit,rawfile printf,unit,szfile printf,unit,0 printf,unit,mfrx printf,unit,format='(10(i6))',frame printf,unit,nfrcal printf,unit,nfrint printf,unit,clcra printf,unit,clcrfac printf,unit,cendty printf,unit,cenunit,cenfnl printf,unit,beamcor printf,unit,restoration printf,unit,size printf,unit,imgdir close,unit free_lun,unit endelse end (version eq '6.1') or (version eq '6.2') or (version eq '6.2.1') : begin if (freq eq 17) then begin if (n_elements(clcra) eq 0) then clcra=-0.5 if (n_elements(clcrs) eq 0) then clcrs=-0.5 if (n_elements(size) eq 0) then size=512 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 if (version eq '6.2.1') then begin if (nfrcal le 0) then begin printf,unit,ref_frame printf,unit,ref_nfrcal endif endif printf,unit,clcra,clcrs printf,unit,clcrfac close,unit free_lun,unit endif else begin if (n_elements(clcra) eq 0) then clcra=-1. if (n_elements(size) eq 0) then size=1024 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 if (version eq '6.2.1') then begin if (nfrcal le 0) then begin printf,unit,ref_frame printf,unit,ref_nfrcal endif endif printf,unit,clcra printf,unit,clcrfac close,unit free_lun,unit endelse end (version eq '6.3') : begin if (freq eq 17) then begin if (n_elements(clcra) eq 0) then clcra=-0.5 if (n_elements(clcrs) eq 0) then clcrs=-0.5 if (n_elements(size) eq 0) then size=512 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 printf,unit,clcrfac close,unit free_lun,unit endif else begin if (n_elements(clcra) eq 0) then clcra=-1. if (n_elements(size) eq 0) then size=1024 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 printf,unit,clcrfac close,unit free_lun,unit endelse end endcase return end