

#Test $data
#*.fits
#menu
#echo "$width $height $depth $bitpix $data $filename $x $y $xcen $ycen" | $text


hmenu Quick Look Plugin

	Quick Look Plugin Help
	*
	web
	#file:$env(DS9Function)
	file:/Users/Vincent/Github/DS9functions/pyds9plugin/doc/ref/index.html
	#file:/Users/Vincent/Github/DS9functions/DS9FireBall/doc/ref/index.html


	Give it a go !
	*
	menu
	#echo "$filename" | $text
	#echo "$env(DS9Function)" | $text
	DS9Utils test_suite -x $xpa_method $param(Tutorials); -t $tutorials   | $text



	verbose
	*
	menu
	DS9Utils verbose -x $xpa_method

	verbose
	*
	bind V
	DS9Utils verbose -x $xpa_method



endhmenu



---
hmenu 1. Generic Functions

#    Test $data
#    *.fits
#    menu
#    $data | DS9Utils -x $xpa_method setup  $data


	Quit #7
	*
	bind q
	DS9Utils quit -x $xpa_method

	Button #7
	*
	bind B
	DS9Utils button #-x $xpa_method

	hmenu Setups
		Change Display Parameters (S) #7
		*
		menu
		DS9Utils setup -x $xpa_method  $param(Setup); -s "$scale"  -l $cut  -c  $color | $text


		Change Display Parameters (S) #7
		*
		bind S
		DS9Utils setup -x $xpa_method  $param(Setup); -s "$scale"  -l $cut  -c  $color | $text

#	    Test $data#
#	    *.fits
#	    menu
#	    $data | DS9Utils -x $xpa_method setup $param(Setup); "$scale"  $cut  0 $color $invert $grid | $text

#		Change Display Parameters (D) #7
#		*.fits
#		menu
#		$data | echo  | $text

		#Check #7
		#*
		#bind t
		#DS9Utils checkFile -x $xpa_method  | $text

		Reset Display Parameters (B)
		*
		menu
		DS9Utils original_settings -x $xpa_method   | $text

		Reset Display Parameters Key
		*
		bind B
		DS9Utils -x $xpa_method original_settings   | $text

		Lock/Unlock Frames (L)
		*
		menu
		DS9Utils lock -x $xpa_method   $param(Lock); -f $var1 -c $var3 -l $var2  -s $var4 -m $var5   | $text

		Lock/Unlock Frames Key
		*
		bind L
		DS9Utils lock -x $xpa_method   $param(Lock); -f $var1 -c $var3 -l $var2  -s $var4 -m $var5   | $text
	endhmenu


	hmenu Header & Data Bases
		Create Header Data Base
		*
		menu
		DS9Utils create_header_catalog -x $xpa_method   $param(Header-Catalog); -p "$path" -i "$info"  | $text


		Filtering & organizing images
		*
		menu
		DS9Utils organize_files -x $xpa_method  $param(subset_); -p "$cat" -n "all" -a $Fields -s "$Mask" | $text


#		Add header Field
#		*
#		menu
#		DS9Utils add_field_to_header -x $xpa_method  $param(CreateHeader); -f $Field -v $Value -c $Comment   | $text

#		Create WCS
#		*
#		menu
#		DS9Utils build_wcs_header -x $xpa_method  $param(Create-WCS) $CRPIX $CDELT $CTYPE $CRVAL | $text



	endhmenu


	hmenu Regions



		Import Regions From Catalog
		*
		menu
		DS9Utils import_table_as_region -x $xpa_method   $param(Catalog-to-region); -p "$path"  -xy "$fields" -n "$name" -f "$form" -r $size -w $wcs -s "$Selection" | $text


		Export DS9 Regions To Catalog
		*
		menu
		#DS9Utils save_region_as_catalog -x $xpa_method   "$filedialog(save)"  2>&1 | tee -a /tmp/DS9Utils.log
		DS9Utils save_region_as_catalog -x $xpa_method   $param(Catalog-name); -p "$save"


#		Replace Regions by value
#		*
#		menu
#		DS9Utils fill_regions -x $xpa_method   $param(Replace-region);  -v $number -o $overwrite   | $text


	endhmenu



	hmenu Image Processing



		Execute Python Command #13
		*
		menu
#		file:/Users/Vincent/Github/DS9functions/pyds9plugin/doc/ref/index.html
		DS9Utils python_command -x $xpa_method  $param(Python-Command); -i "" -e "$exp"  -o $overwrite | $text

		Interactive 1D Fitting On Plot
		*
		menu
		DS9Utils fit_ds9_plot -x $xpa_method   $param(Background-Fit-1D); -b $background -g $gaussians -m $moffats -v $voight -o $other  | $text

		Interactive Manual Fitting
		*
		menu
		DS9Utils manual_fitting -x $xpa_method  | $text


		Fit Gaussian 2D
		*
		menu
		DS9Utils fit_gaussian_2d -x $xpa_method  -p 1   | $text
		#DS9Utils fit_gaussian_2d -x $xpa_method   - 0 0   | $text

		Fit Gaussian 2D
		*
		bind f
		DS9Utils fit_gaussian_2d -x $xpa_method   -p 0   | $text
		#DS9Utils fit_gaussian_2d -x $xpa_method   - 0 0   | $text


#		2D Convolution
#		*
#		menu
#		DS9Utils Convolve2d -x $xpa_method  $param(Convolution); $type $pat_c $sizex  "$path"   | $text



#		Trimming
#		*
#		menu
#		DS9Utils trim -x $xpa_method  | $text

#		Plot 3rd Dimension From Region(s)
#		*
#		menu
#		DS9Utils PlotSpectraDataCube -x $xpa_method  $param(Extract-spectra);  $smoothl   | $text

	endhmenu



#	hmenu Data Cubes Processing

#	endhmenu


	Open Image (O)
	*
	menu
	DS9Utils open_file -x $xpa_method  $param(open); -p "$path" -t $type  -c 0 | $text

	Open Image Key
	*
	bind O
	DS9Utils open_file -x $xpa_method  $param(open); -p "$path" -t $type  -c 0 | $text

#	Stack Images (s)  #20#
#	*
#	menu
#	DS9Utils stack_images -x $xpa_method  $param(Stacking); $Path $stack -  $output | $text

#	Stack Images key
#	*
#	bind s
#	DS9Utils stack -x $xpa_method  "$entry(Number of the images to stack: first-last)" "$entry(Number of dark images first-last to stack and  subtract, press enter if no dark)"   | $text


	Plot Region In 3D
	*
	menu
	DS9Utils plot_3d -x $xpa_method  | $text


	Convert image
	*
	menu
	DS9Utils convert_image  -x $xpa_method $param(Conversion); -r $scaling -t $type -p - | $text





endhmenu


###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################




hmenu 2. Instrumentation - AIT

	hmenu Focus

		Throughfocus  #24
		*
		menu
		DS9Utils throughfocus -x $xpa_method  $param(Throughfocus); -p "$Path" -w $WCS -s $sort -v "$offsets"  | $text  #$steps

		Explore PSFs/Vignettes #24
		*
		menu
		DS9Utils explore_throughfocus -x $xpa_method  $param(SExtractor-Vignets-Path); -p "$Path" -s $sort | $text  #$steps


#		Throughfocus Image Key
#		*
#		bind t
#		DS9Utils throughfocus -x $xpa_method  $param(Throughfocus); "$Path" $WCS $steps  | $text

		Radial Profile (r)
		*
		menu
		DS9Utils radial_profile -x $xpa_method  $param(radial_profile)  -c $center -d $diam    | $text

		Radial Profile Key
		*
		bind r
		DS9Utils radial_profile -x $xpa_method  $param(radial_profile)  -c $center -d $diam    | $text


#		Visualisation Throughfocus
#		*
#		menu
#		DS9Utils throughfocus_visualisation -x $xpa_method  -p "$entry(RegExp paths of the images you want to display. Use global pattern matching.)"    | $text


	endhmenu





	#hmenu Detector Characterization




#		Autocorrelation
#		*
#		menu
#		DS9Utils autocorrelation -x $xpa_method  $param(autocorr); $type  "$path"   | $text


#		2D Fast Fourrier Transform
#		*
#		menu
#		DS9Utils FFT -x $xpa_method  $param(Images-to-analyze);  "$path"  | $text





#		EMCCD histogram #29
#		*
#		menu
#		DS9Utils emccd_model -x $xpa_method  $param(EMCCD);  $smearing | $text


	#endhmenu



	Column Line Correlation
	*
	menu
#		DS9Utils column_line_correlation -x $xpa_method  $param(Images-to-analyze); "$path"   | $text
	DS9Utils column_line_correlation -x $xpa_method  | $text


#	Guidance
#	*
#	menu
#	DS9Utils guidance -x $xpa_method    | $text


	Centering (C)
	*
	menu
	DS9Utils center_region -x $xpa_method   $param(Centering); -m $method -b 0  | $text


	Centering (C)
	*
	bind C
	DS9Utils center_region -x $xpa_method   $param(Centering); -m $method -b 0  | $text

	Light curve
	*
	menu
	#DS9Utils light_curve -x $xpa_method  $param(Click-Enter-For-Only-DS9-Image); $all $b $e $list "$path"    | $text
	DS9Utils light_curve -x $xpa_method  $param(Images-to-analyze); "$path"    | $text



endhmenu




###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################







hmenu 3. Astronomical Softwares



	STIFF - Color Images
	*
	menu
	DS9Utils DS9saveColor -x $xpa_method   $param(STIFF-Color-image); -p1 "$var1" -p2 "$var2" -p3 "$var3" -B $BINNING -b $BITS_PER_CHANNEL -c $COLOUR_SAT -G $GAMMA_ -F $GAMMAFAC -g $GAMMATYPE -t $IMAGE_TYPE -maxl $MAX_LEVEL -maxt $MAX_TYPE -minl $MIN_LEVEL -mint $MIN_TYPE -o $OUTFILE_NAME -S $SKY_LEVEL -s $SKY_TYPE    | $text


	PSFex
	*
	menu
	DS9Utils DS9PSFEX -x $xpa_method   $param(PSFex); -p $ENTRY_PATH  -BT  $BASIS_TYPE -BN  $BASIS_NUMBER -PS  $PSF_SAMPLING -PA $PSF_ACCURACY -ps $PSF_SIZE -CK $CENTER_KEYS  -PK "'$PHOTFLUX_KEY'"  -PEK "'$PHOTFLUXERR_KEY'"  -PSFK $PSFVAR_KEYS   -PSFG $PSFVAR_GROUPS    -PSFD   $PSFVAR_DEGREES   -SA 	$SAMPLE_AUTOSELECT  -ST $SAMPLEVAR_TYPE  -SF $SAMPLE_FWHMRANGE  -SV  $SAMPLE_VARIABILITY  -SM $SAMPLE_MINSN  -SMAX $SAMPLE_MAXELLIP  -CD $CHECKPLOT_DEV -CT $CHECKPLOT_TYPE -CN  $CHECKPLOT_NAME  	-CIT $CHECKIMAGE_TYPE  -CIN  $CHECKIMAGE_NAME -PD   $PSF_DIR 	 -HT  $HOMOBASIS_TYPE -HP $HOMOPSF_PARAMS -W $WRITE_XML -X $XML_NAME -N $NTHREADS -q "$Selection"  | $text


	Astrometric Calibration (astrometry.net)
	*
	menu
	DS9Utils astrometry_net -x $xpa_method   $message(okcancel,You are about to run an astrometric analysis. This function will send the image to the astrometry.net server and run an astrometric algorithm to generate a WCS header. Please note that this function requires an internet connection and that processing might take a few minutes and might not converge. DS9 will let you know if it converges and the WCS header will be added to the image header.)  $param(LostInSpace); --type $Image --scale-units "$scale_units" --scale-lower "$scale_lower" --scale-upper "$scale_upper" --scale-est "$scale_est" --scale-err "$scale_err" --ra  "$center_ra" --dec "$center_dec" --radius "$radius"  --downsample "$downsample_factor" --tweak-order "$tweak_order" --crpix-center $crpix_center --parity  $parity --positional_error "$positional_error"   | $text

	MaxiMask
	*
	menu
	DS9Utils maxi_mask -x $xpa_method   $param(MaxiMask);  -pt $prob -b $size -m $single -n $net  -f $F1-$F2-$F3-$F4-$F5-$F6-$F7-$F8-$F9-$F_10-$F_11-$F_12-$F_13-$F_14 -p $P1-$P2-$P3-$P4-$P5-$P6-$P7-$P8-$P9-$P_10-$P_11-$P_12-$P_13-$P_14  -t $T1-$T2-$T3-$T4-$T5-$T6-$T7-$T8-$T9-$T_10-$T_11-$T_12-$T_13-$T_14    | $text



	#hmenu SExtractor

		SExtractor #36
		*
		menu

		DS9Utils RunSextractor -x $xpa_method  $param(SEXTRACTOR-NEW); -d "$DETECTION_IMAGE" -CN "$CATALOG_NAME" -CT $CATALOG_TYPE -PN $PARAMETERS_NAME -DT $DETECT_TYPE -DM $DETECT_MINAREA -Dm $DETECT_MAXAREA -TT $THRESH_TYPE -dT $DETECT_THRESH -AT $ANALYSIS_THRESH -F $FILTER -FN $FILT_NAME -DN $DEBLEND_NTHRESH -D $DEBLEND_MINCONT -C $CLEAN_T -CP $CLEAN_PARAM -M $MASK_TYPE -WT $WEIGHT_TYPE -RW $RESCALE_WEIGHTS -WI "$WEIGHT_IMAGE" -WG $WEIGHT_GAIN -FI $FLAG_IMAGE -FT $FLAG_TYPE -PA $PHOT_APERTURES -P $PHOT_AUTOPARAMS -PP $PHOT_PETROPARAMS -PF $PHOT_FLUXFRAC -SL $SATUR_LEVEL -SK $SATUR_KEY -MZ $MAG_ZEROPOINT -MG $MAG_GAMMA -G $GAIN -PS $PIXEL_SCALE -SF $SEEING_FWHM -SN $STARNNW_NAME -ct $CHECKIMAGE_TYPE -BT $BACK_TYPE -BV $BACK_VALUE -BS $BACK_SIZE -BFS $BACK_FILTERSIZE -BPT $BACKPHOTO_TYPE -bpt $BACKPHOTO_THICK -BFT $BACK_FILTTHRESH -MO $MEMORY_OBJSTACK -MP $MEMORY_PIXSTACK -MB $MEMORY_BUFSIZE  | $text


#		SExtractor (Basic parameters)
#		*
#		menu
#		DS9Utils RunSextractor -x $xpa_method  $param(SEXTRACTOR-NEW); -d "$DETECTION_IMAGE" -CN "$CATALOG_NAME" -CT $CATALOG_TYPE -PN $PARAMETERS_NAME -DT $DETECT_TYPE -DM $DETECT_MINAREA -Dm $DETECT_MAXAREA -TT $THRESH_TYPE -dT $DETECT_THRESH -AT $ANALYSIS_THRESH -F $FILTER -FN $FILT_NAME -DN $DEBLEND_NTHRESH -D $DEBLEND_MINCONT -C $CLEAN_T -CP $CLEAN_PARAM -M $MASK_TYPE -WT $WEIGHT_TYPE -RW $RESCALE_WEIGHTS -WI "$WEIGHT_IMAGE" -WG $WEIGHT_GAIN -FI $FLAG_IMAGE -FT $FLAG_TYPE -PA $PHOT_APERTURES -P $PHOT_AUTOPARAMS -PP $PHOT_PETROPARAMS -PF $PHOT_FLUXFRAC -SL $SATUR_LEVEL -SK $SATUR_KEY -MZ $MAG_ZEROPOINT -MG $MAG_GAMMA -G $GAIN -PS $PIXEL_SCALE -SF $SEEING_FWHM -SN $STARNNW_NAME -ct $CHECKIMAGE_TYPE -BT $BACK_TYPE -BV $BACK_VALUE -BS $BACK_SIZE -BFS $BACK_FILTERSIZE -BPT $BACKPHOTO_TYPE -bpt $BACKPHOTO_THICK -BFT $BACK_FILTTHRESH -MO $MEMORY_OBJSTACK -MP $MEMORY_PIXSTACK -MB $MEMORY_BUFSIZE -N $NTHREADS | $text



	#endhmenu




	hmenu SWARP


		SWARP #38
		*
		menu
		DS9Utils DS9SWARP -x $xpa_method   $param(SWARP); -p "$PATH" -i $IMAGEOUT_NAME -w $WEIGHT_TYPE -rw $RESCALE_WEIGHTS -W "$WEIGHT_IMAGE" -c $COMBINEI -ct $COMBINE_TYPE -CA $CLIP_AMPFRAC -CS $CLIP_SIGMA -CT $CELESTIAL_TYPE -PT $PROJECTION_TYPE -PE $PROJECTION_ERR -C_T $CENTER_TYPE -C $CENTERI -PST $PIXELSCALE_TYPE -PS $PIXEL_SCALE -IS $IMAGE_SIZE -R $RE-SAMPLING  -r $RESAMPLING_TYPE  -o $OVERSAMPLING  -I $INTERPOLATE -SB $SUBTRACT_BACK  -BS $BACK_SIZE -BFS $BACK_FILTERSIZE -BFT $BACK_FILTTHRESH     | $text



		Resample images #38
		*
		menu
		DS9Utils resample -x $xpa_method   $param(Resample); -p "$PATH" -P $PIXEL_SCALE -i $IMAGE_SIZE -r $RESAMPLING_TYPE -s $RESAMPLE_SUFFIX   | $text

	endhmenu


	hmenu Photutils

		Extract Sources
		*
		menu
		DS9Utils extract_sources -x $xpa_method  $param(Source-Extraction); -e $erosion-dilatation -t $threshold -f $fwhm -a  $theta -i $iters  -r $ratio -d $delete-doublons    | $text #-p "$path"


		Subtract Background
		*
		menu
		DS9Utils background_estimation -x $xpa_method  $param(Background-Subtraction); -s $sigma -b $bckd -r $rms -f $filter -box $box -per $percentile -m $mask -snr $snr -n $npixels -d $dilate -p -  | $text

		Aperture photometry
		*
		menu
		DS9Utils aperture_photometry -x $xpa_method   $param(Aperture-photometry); -a $aper -z $zpm   | $text



	endhmenu


endhmenu
#	hmenu 4. Under development
#				Throw Apertures
#				*
#				menu
#				DS9Utils throw_apertures -x $xpa_method   $param(Throw-Apertures);  -n $number -s $size  -f $form -e $spacing | $text


#				Plot aperture's values
#				*
#				menu
#				DS9Utils AperturesParams -x $xpa_method   $param(Plot-Apertures);  "$path" $x $y  $select" | $text

#				Interpolate NaNs
#				*
#				menu
#				#DS9Utils interpolate_nans -x $xpa_method  $param(Click-Enter-For-Only-DS9-Image); $all $b $e $list "-"   | $text
#				DS9Utils interpolate_nans -x $xpa_method  | $text

#				Get image depth
#				*
#				menu
#				DS9Utils  get_depth_image -x $xpa_method$param(Get-depth); -z $mag_zp -a $aper_size -n $N_aper  | $text

#				Compute Gain From Fluctuation #29
#				*
#				menu
#				DS9Utils compute_gain -x $xpa_method  $param(EmGain); 0 - $box 0 0  "$path"   | $text

#				CreateContourRegions
#				*
#				menu
#				DS9Utils CreateContourRegions -x $xpa_method  $param(CreateContourRegions);   $block $theshold  $erosion  $dilatation  | $text


#				SExtractor++ (Beta Version)
#				*
#				menu
#				DS9Utils sextractor_pp -x $xpa_method  $param(SEXTRACTOR); -d "$DETECTION_IMAGE" -f "$CATALOG_NAME" -F "$CATALOG_TYPE" | $text

#				#E  $PARAMETERS_NAME  $DETECT_TYPE  $DETECT_MINAREA  $THRESH_TYPE  $DETECT_THRESH  $ANALYSIS_THRESH  $FILTER  $FILT_NAME  $DEBLEND_NTHRESH  $DEBLEND_MINCONT  $CLEAN_T   $CLEAN_PARAM  $MASK_TYPE  $WEIGHT_TYPE  "$WEIGHT_IMAGE"  $PHOT_APERTURES  $PHOT_AUTOPARAMS  $PHOT_PETROPARAMS  $PHOT_FLUXFRAC  $MAG_ZEROPOINT  $PIXEL_SCALE  $SEEING_FWHM  $STARNNW_NAME  $BACK_TYPE  $BACK_SIZE  $BACK_FILTERSIZE  $BACKPHOTO_TYPE  $BACKPHOTO_THICK  $BACK_FILTTHRESH  $CHECKIMAGE_TYPE check.fits   0  $REGION_NAME


#			#		Cosmology Calculator
#			#		*
#			#		menu
#			#		DS9Utils cosmology_calculator -x $xpa_method  $param(Cosmology); $Cosmo $redshift $H0 $Omega_m $Ode0 $Uncertainty  | $text

#					Cosmology Calculator
#					*
#					menu
#					DS9Utils cosmology_calculator -x $xpa_method  LambdaCDM 1 70 0.2 0.7 -  | $text



#					Spectra/Filter simulator
#					*
#					menu
#					DS9Utils PlotSpectraFilters -x $xpa_method   | $text


#					Convertissor
#					*
#					menu
#					DS9Utils Convertissor -x $xpa_method  $param(Distance-Convertissor); $Value $Unit1 $Unit2 $Redshift  | $text

#					Function displayor
#					*
#					menu
#					DS9Utils interactive_plotter -x $xpa_method  $param(Function); "$formula" "$xrange" $plot "$path" | $text


#					Simulate Sky Image
#					*
#					menu
#					DS9Utils CreateImageFromCatalogObject -x $xpa_method  -p '"$entry(Fits/csv/ascii sectractor catalog: xcenter, ycenter, peak, sigmax, sigmay, angle. Let BLANK to create random galaxies!)"'  | $text


#	endhmenu









param Function
plot menu {Plot type} Linear|Polar|LinLog|LogLog {Choose beyond the 2D plots, still use x (not r) in polar plots.}#|PolarLog|Plot3D
formula entry {f(x,ai...) = } sin(a0*x)*sin(a1*x) {Functions with range values}
xrange entry {x range} -10,10 {Value to be added to -2.5 log(SumPix). Will not be used if Data.}
path entry {Data} - {Optional, enter [ascii/csv/fits] 2-columns table path}
endparam


param Cosmology
#Cosmo menu {Cosmology} LambdaCDM|wCDM|WMAP5|WMAP7|WMAP9|Planck13|Planck15 {Cosmology to use} #|w0waCDM|w0wzCDM|wpwaCDM
#redshift entry {z} 0.7-3.0 {Redshift or list of redshift eg '1-2-3.5'}
#H0 entry {H0} 70 {Hubble constant at z = 0. If a float, must be in [km/sec/Mpc]}
#Omega_m entry {Omega_m} 0.20 {Omega matter: density of non-relativistic matter in units of the critical density at z=0.}
#Ode0 entry {Ode0} 0.70 {Omega dark energy: density of dark energy in units of the critical density at z=0.}
#Uncertainty entry {Uncertainty} H0:1 {Parameter and uncertainty in % eg. H0:1 or Om0:2.5 or Ode0:1.5}
endparam



#help
#Main Help
#A help message may contain
#multiple lines of description of the tasks
#in the menu or menus
#endhelp






Test
*
bind n
DS9Utils  next_step -x  $xpa_method  | $text #-x $xpa_method

Test
*
bind N
DS9Utils next_step  -x  $xpa_method  | $text #-x $xpa_method

#DS9Utils -x $xpa_method Help
#file:DS9Utils -x $xpa_method Help
#$env(DS9Function)
#/Users/Vincent/Github/DS9functions/DS9FireBall/doc/ref/index.html





Fluctucation
*
bind F
DS9Utils -x $xpa_method compute_fluctuation $param(ComputeFluctuation) -n $Number -a $Radius | $text




---
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################







###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################




param MaxiMask
prob checkbox {PROBA THRESH} 0 {}
size entry {BATCH SIZE} 8 {}
single checkbox {SINGLE MASK} 0 {}
net entry {NET PATH} 0 {}

F1 checkbox {Cosmic Rays} 0 {}
F2 checkbox {Hot Columns/Lines} 0 {}
F3 checkbox {Dead Columns/Lines/Clusters} 0 {}
F4 checkbox {Hot Pixels} 0 {}
F5 checkbox {Dead Pixels} 0 {}
F6 checkbox {Persistence} 0 {}
F7 checkbox {TRaiLs} 1 {}
F8 checkbox {FRinge patterns} 0 {}
F9 checkbox {NEBulosities} 0 {}
F_10 checkbox {SATurated pixels} 0 {}
F_11 checkbox {diffraction SPikes} 0 {}
F_12 checkbox {OVerscanned pixels} 0 {}
F_13 checkbox {Bright BackGround pixel} 0 {}
F_14 checkbox {Background} 0 {}

P1  entry {Cosmic Rays} 0.0007 {}
P2  entry {Hot Columns/Lines} 0.0008 {}
P3  entry {Dead Columns/Lines/Clusters} 0.0080 {}
P4  entry {Hot Pixels} 0.000001 {}
P5  entry {Dead Pixels} 0.000001 {}
P6  entry {Persistence} 0.00001 {}
P7  entry {TRaiLs} 0.006 {}
P8  entry {FRinge patterns} 0.01 {}
P9  entry {NEBulosities} 0.01 {}
P_10 entry {SATurated pixels} 0.0016 {}
P_11 entry {diffraction SPikes} 0.013 {}
P_12 entry {OVerscanned pixels} 0.005 {}
P_13 entry {Bright BackGround pixel} 0.07 {}
P_14 entry {Background} 0.90 {}

T1  entry {Cosmic Rays} 0.51 {}
T2  entry {Hot Columns/Lines} 0.52 {}
T3  entry {Dead Columns/Lines/Clusters} 0.50 {}
T4  entry {Hot Pixels} 0.23 {}
T5  entry {Dead Pixels} 0.99 {}
T6  entry {Persistence} 0.66 {}
T7  entry {TRaiLs} 0.55 {}
T8  entry {FRinge patterns} 0.62 {}
T9  entry {NEBulosities} 0.45 {}
T_10 entry {SATurated pixels} 0.78 {}
T_11 entry {diffraction SPikes} 0.41 {}
T_12 entry {OVerscanned pixels} 0.37 {}
T_13 entry {Bright BackGround pixel} 0.49 {}
T_14 entry {Background} 0.33 {}


endparam

param CreateContourRegions
block menu {Block} 1|2|4|8|16|32 {}
theshold entry {Threshold} 0.1 {}
erosion entry {Erosion} 0 {}
dilatation entry {Dilatation} 50 {}
endparam


param EMCCD
smearing checkbox {Smearing} 0 {Use smearing model}
endparam

param Aperture-photometry
aper entry {Apertures} 5,10,15 {Apertures radius in pixel}
zpm entry {Zero point magnitude} 0 {Value to be added to -2.5 log(SumPix)}
endparam


param Create-WCS
CRPIX entry {CRPIX} 0,0 {Pixel coordinate of reference point}
CDELT entry {CDELT} 1,1 {Coordinate increment at reference point [in degrees]}
CTYPE menu {CTYPE} RA---AIR,DEC--AIR|RA---TAN,DEC--TAN {Supported projections}
CRVAL entry {CRVAL} 1,1 {Coordinate value at reference point [in degrees]}
endparam



param open
path open {Path of the image(s) to open}    {} #NORMAL
#clip checkbox {Clipboard image}  0  {Open Screenshot image from clipboard Shift+Ctrl+Cmd+4 on OSX} #NORMAL
type menu {Type} Slice|Multi-Frames-As-Cube|Multi-Frames|RGB|CUBE|IMPORT-3D|PRISM {}
endparam


param Catalog-name
save save {Path where to save the catalog}  /tmp/test.csv  {} #NORMAL
endparam

param Plot-Apertures
save save {Regions' catalog path}  /tmp/test.csv  {} #NORMAL
x menu {X}  xcentroid|ycentroid|var|std|mean|median|min|max {} #NORMAL
y menu {Y}  xcentroid|ycentroid|var|std|mean|median|min|max  {} #NORMAL
select entry {Path where to save the catalog}    {} #NORMAL
endparam



param ComputeFluctuation
Number entry {Number} 50000 {Number of aperture} #NORMAL
Radius entry {Radius} 20 {Radius of the aperture in pixel}
endparam

param check
check checkbox {Do you wish to continue?} 1 {}
endparam

param verbose
verbose checkbox {Verbose} 0 {Check to enter verbose mode.} #NORMAL QUIET|DEBUG
endparam

param Get-depth
mag_zp entry {Magnitude zero point} - {'-' for Auto (CLAUDS): 30 for MegaCam and VIRCAM, 27 for HSC}
aper_size entry {Aperture size} 2 {Size of the random apertures in arc seconds}
N_aper entry {number of random apertures} 10000 {Number of random apertures}
endparam




param Plot-Comparison-Mag
path entry {Path} - {Catalog path}
var1 entry {Var_1} - {Var_1 in plot Var_1 - Var_2 in terms of Var_3 }
var2 entry {Var_2} - {Var_2 in plot Var_1 - Var_2 in terms of Var_3 }
var3 entry {Var_3} - {Var_3 in plot Var_1 - Var_2 in terms of Var_3 }
Bins entry {Bins} 20,22,24,26 {Bins on wich compute sigma estimator}
endparam

param SExtractor-Vignets-Path
Path open {Path} "" {SExtractor catalog with VIGNETS}
sort menu {Sorting-type} MAG_AUTO|FWHM_IMAGE|THETA_IMAGE|ELLIPTICITY|X_IMAGE|Y_IMAGE|AMPLITUDE {Column to use to sort the PSFs}
endparam

param Setup
#var2 text {} {To explore a specific part of the image select a region. We can not write more...} {}
#var2 text {} {It is not possible to write a lot here... Indeed there is not much room...} {}
scale menu {Scale} Log|Linear|Power|Square-Root|ASINH|SINH|Histogram-Equalization|zscale|minmax {Scale}
cut entry {Scale Limits} 50-99.9 {Scale limits in percentile of the image (or defined region)}
#smooth menu {Smooth} 0|1|2|3|4|5|6|7|8|9|10 {Smoothing boxcar radius in pixel}
color menu {Color} cool|grey|cubehelix0|red|green|blue|a|b|bb|he|i8|aips0|sls|hsv|heat|rainbow|standard|staircase {Color}
#invert checkbox {invert} 0 {Invert colormap}
#grid checkbox {Grid} 0 {Display grid}
endparam


param Stack-spectra
wave entry {Wavelength-range} - {- for all or min-max. eg: 3700-4200 A}
smooth entry {smooth} 1 {Smoothing kernel size in pixel (int unpair)}
endparam



param Replace-region
number entry {Replacing value} nan {Value by which you want to replace the encircled pixels, eg. 5.4, nan, -inf.}
overwrite checkbox {Overwrite} 0 {If False the new image will be saved at $filename_modified.fits}
endparam



param Extract-spectra
smoothl entry {Spectral smoothing} 1 {Smoothing kernel size in pixel}
#smoothx entry {Spatial smoothing} 1 {Smoothing kernel size in pixel}
endparam



param Plot-3d
log checkbox {Log} 0 {Plot in log value}
#kernel entry {Smoothing} - {Smoothing kernel sizes in pixel (x,y), eg: 3 -  1.5,0.9 or - for no smoothing}
endparam




param SWARP
PATH open {PATHS} $filename {Path of the images you want to stack, use glob syntax with ? and *.}
#BACK_DEFAULT entry {BACK_DEFAULT} 0.0 {Default background value to be subtracted in BACK TYPE MANUAL mode.}
IMAGEOUT_NAME entry {IMAGEOUT_NAME} $filename_coadd.fits {Name of the output image file}

WEIGHT_TYPE menu {WEIGHT_TYPE} NONE|BACKGROUND|MAP_RMS|MAP_VARIANCE|MAP_WEIGHT {}
RESCALE_WEIGHTS checkbox {RESCALE_WEIGHTS} 1 {Rescale input weights/variances (Y/N)?}
WEIGHT_IMAGE  entry {WEIGHT_IMAGE} "" {Name of the input weight image file}


COMBINEI checkbox {COMBINE} 1 {Combine resampled images (Y/N)?}
COMBINE_TYPE menu {COMBINE_TYPE} MEDIAN|AVERAGE|MIN|MAX|WEIGHTED|CHI2|CHI-MEAN|SUM {Tells SWarp how to combine resampled images}
CLIP_AMPFRAC entry {CLIP_AMPFRAC} 0.3 {Fraction of flux variation allowed with clipping}
CLIP_SIGMA entry {CLIP_SIGMA} 4.0 {error multiple variation allowed with clipping}


CELESTIAL_TYPE menu {CELESTIAL_TYPE} NATIVE|PIXEL|EQUATORIAL|GALACTIC|ECLIPTIC {Celestial coordinate system in output}
PROJECTION_TYPE menu {PROJECTION_TYPE} TAN|AZP|STG|SIN|ARC|ZPN|ZEA|AIR|CYP|CEA|CAR|MER|COP|COE|COD|COO|BON|PCO|GLS|PAR|MOL|AIT|TSC|CSC|QSC {Projection system used in output, in standard WCS notation}
PROJECTION_ERR entry {PROJECTION_ERR} 0.001 {Maximum position error (in pixels) allowed for bicubic-spline interpolation of the astrometric reprojection. 0 turns off interpolation.}

CENTER_TYPE menu {CENTER_TYPE} ALL|MOST|MANUAL {Tells SWarp how to center the output frame}
CENTERI entry {CENTERI} 0 {Position of the center in CENTER TYPE MANUAL mode. Can be given in floating point notation, in hh:mm:ss or dd:mm:ss}
PIXELSCALE_TYPE menu {PIXELSCALE_TYPE} MEDIAN|MIN|MAX|MANUAL|FIT {Tells SWarp how to adjust the output pixel size}
PIXEL_SCALE entry {PIXEL_SCALE} 0.0 {Step between pixels in each dimension in PIXELSCALE_TYPE MANUAL mode. Must be expressed in arcseconds for angular coordinates.}
IMAGE_SIZE entry {IMAGE_SIZE} 0.0 {Dimensions of the output image in PIXELSCALE TYPE MANUAL or FIT mode. 0 means automatic}

RE-SAMPLING checkbox {RE-SAMPLING} 1 {Resample input images ?}
RESAMPLING_TYPE menu {RESAMPLING_TYPE} LANCZOS3|NEAREST|BILINEAR|LANCZOS2|LANCZOS4 {Image resampling method}
OVERSAMPLING entry {OVERSAMPLING} 0 {Amount of oversampling in each dimension. 0 means automatic.}
INTERPOLATE checkbox {INTERPOLATE} 0 {Interpolate bad input pixels ?}

SUBTRACT_BACK checkbox {SUBTRACT_BACK} 1 {Subtraction sky background ?}
BACK_SIZE entry {BACK_SIZE} 128 {Size in pixels of a background mesh.}
BACK_FILTERSIZE entry {BACK_FILTERSIZE} 3 {Size in background meshes of the background-filtering mask.}
BACK_FILTTHRESH entry {BACK_FILTTHRESH} 0.0 {Difference threshold (in ADUs) for the background-filtering}

#COMBINE_BUFSIZE entry {COMBINE_BUFSIZE} 256 {Maximum amount of buffer memory (in MB) used for the co-addition process.}
#COPY_KEYWORDS entry {COPY_KEYWORDS} OBJECT {Coma-separated list of FITS keywords that will be propagated from the input FITS headers to the coadded and resampled image headers.}
#FSCALASTRO_TYPE menu {FSCALASTRO_TYPE} FIXED|NONE|VARIABLE {Tells SWarp how to compute the astrometric part of the flux-rescalin}
#FSCALE_DEFAULT entry {FSCALE_DEFAULT} 1.0 {Default flux scale to adopt for each image if the FSCALE KEYWORD keyword is not found in the}
#GAIN_DEFAULT entry {GAIN_DEFAULT} 0.0 {Default gain conversion factor in e/ADU to adopt for each image if the GAIN keyword is not found in the FITS header. 0 means infinite gain.}
#GAIN_KEYWORD entry {GAIN_KEYWORD} GAIN {FITS keyword that should contain the gain in input images.}
#MEM_MAX entry {MEM_MAX} 256 {Maximum amount of megabytes allowed for storing input images in memory}




#SUBTRACT_BACK entry {SUBTRACT_BACK} Y {If true, input images are background-subtracted prior to resampling. VMEM}
#WRITE_FILEINFO entry {WRITE_FILEINFO} N {If true, extended information about input files is written in the header of the output FITS image.}
#VERBOSE_TYPE menu {VERBOSE_TYPE} NORMAL|QUIET|FULL {Tells SWarp how well operations should be commented}


#WRITE_XML checkbox {WRITE_XML} 1 {Write XML file (Y/N)?}
#XML_NAME entry {XML_NAME} swarp.xml {Filename for XML output}
endparam




param Resample
PATH open {PATHS} $filename {Path of the images you want to stack, use glob syntax with ? and *.}
#PIXELSCALE_TYPE menu {PIXELSCALE_TYPE} MEDIAN|MIN|MAX|MANUAL|FIT {Tells SWarp how to adjust the output pixel size}
PIXEL_SCALE entry {PIXEL_SCALE} 0.0 {Step between pixels in each dimension in PIXELSCALE_TYPE MANUAL mode. Must be expressed in arcseconds for angular coordinates.}
IMAGE_SIZE entry {IMAGE_SIZE} 0.0 {Dimensions of the output image in PIXELSCALE TYPE MANUAL or FIT mode. 0 means automatic}
#RE-SAMPLING checkbox {RE-SAMPLING} 1 {Resample input images (Y/N)?}
RESAMPLING_TYPE menu {RESAMPLING_TYPE} LANCZOS3|NEAREST|BILINEAR|LANCZOS2|LANCZOS4 {Image resampling method}
#OVERSAMPLING entry {OVERSAMPLING} 0 {Amount of oversampling in each dimension. 0 means automatic.}
RESAMPLE_SUFFIX   entry {RESAMPLE_SUFFIX}     .resamp.fits    {filename extension for resampled images}
endparam





param STIFF-Color-image
var1 open {path 1} "" {Path of the red image eg. ~i (770nm) band}
var2 open {path 2} "" {Path to the green image eg. ~r (620nm) band}
var3 open {path 3} "" {Path to the blue image eg. ~g (480nm) band}
OUTFILE_NAME entry {OUTFILE_NAME} stiff.tiff {Output image file name}
IMAGE_TYPE menu {IMAGE_TYPE} AUTO|TIFF|TIFF-pyramid {Output image format.}

BITS_PER_CHANNEL menu {BITS PER CHANNEL}  8|16|-32 {Number of bits per channel in the output image. 8, 16 for int, -32 for float.}
BINNING menu {BINNING} 1|2 {Pixel binning factor for both axes, or along each axis.}

SKY_TYPE menu {SKY_TYPE} AUTO|MANUAL {Sky level determination in each input image.}
SKY_LEVEL entry {SKY_LEVEL} 0.0 {User-specified sky level in SKY TYPE MANUAL mode.(1<n<m_ima)}

MIN_TYPE menu {MIN_TYPE} GREYLEVEL|QUANTILE|MANUAL {Meaning of the MAX LEVEL parameter}
MIN_LEVEL entry {MIN_LEVEL} 0.001 {Upper end of image dynamic range (see MIN TYPE).}

MAX_TYPE menu {MAX_TYPE} QUANTILE|MANUAL {Meaning of the MAX LEVEL parameter}
MAX_LEVEL entry {MAX_LEVEL} 0.995 {Upper end of image dynamic range (see MAX TYPE).}

GAMMATYPE menu {GAMMA_TYPE} POWER-LAW|SRGB|REC.709 {Gamma correction type.}
GAMMA_ entry {GAMMA} 2.2 {Image gamma (exponent of the display intensity transfer curve) for POWER-LAW GAMMA TYPEs.}
GAMMAFAC entry {GAMMA_FAC} 1.0 {gamma correction factor for the luminance image component.}


COLOUR_SAT entry {COLOUR_SAT} 1.0 {Colour saturation factor.}
#COPY_HEADER entry {COPY_HEADER} N {when set to Y, a copy of the (first) FITS image header replaces the content of the ImageDescription tag in the output TIFF file.}
#DESCRIPTION entry {DESCRIPTION} STIFF_image {Description string to include in the output TIFF image header (ImageDescription tag)}

endparam




param Bands-to-use
corr checkbox {Variance correction} 1 {Apply the variance map correction factor}
U checkbox {U} 1 {U band 		- 365 nm - FWHM=66nm}
us checkbox {Us} 0 {Us band 		- 365 nm - FWHM=66nm}

#B checkbox {B} 0 {B band 		- 445 nm - FWHM=94nm}
#V checkbox {V} 0 {V band 		- 551 nm - FWHM=88nm}
G checkbox {G} 1 {G band 		- 464 nm - FWHM=128nm}
R checkbox {R} 1 {R band 		- 658 nm - FWHM=138nm}

I checkbox {I} 1 {I band 		- 806 nm - FWHM=149nm}
Z checkbox {Z} 1 {Z band 		- 900 nm }
Y-HSC checkbox {Y-HSC} 1 {Y band 		- 1020 nm - FWHM=120nm}
Y-VIRCAM checkbox {Y-VIRCAM} 0 {Y band 		- 1020 nm - FWHM=120nm}
J checkbox {J} 0 {J band 		- 1220 nm - FWHM=213nm}
H checkbox {H} 0 {H band 		- 1630 nm - FWHM=307nm}
Ks checkbox {Ks} 1 {Ks band 		- 2190 nm - FWHM=390nm}
#L checkbox {L} 0 {L band 		- 3450 nm - FWHM=472nm}

#M checkbox {Ks} 0 {M band 		- 4750 nm - FWHM=460nm}
#N checkbox {Ks} 0 {M band 		- 10500 nm - FWHM=2500nm}
#Q checkbox {Ks} 0 {Q band 		- 21000 nm - FWHM=5800nm}
endparam

param Variable-Smearing-Kernel
Smearing entry {Smearing length} 1.5 {Smearing exponential folding length in pixel}
RateSmearing entry {Smearing length rate} 50000 {Smearing length exponential decrement (0 means constant smearing)}
endparam


param Detector-Parameters
size entry {Detector size} 3216,2069 {Size of the detector in pixels}
overscan checkbox {Overscan} 1 {Does the detector contain OS regions}
OS entry {Overscan limits} 1066,2124 {Pixel number of the overscan regions positions, put '-' if None}
ConversionGain entry {Conversion gain} 0.53 {ADU/electron}
EmGain entry {Amplification gain} 1410 {electron per electron}
n_registers entry {Number of registers} 604 {Number of amplification register in EMCCD}
Bias entry {Bias} 3335 {Bias value in ADU - if auto 3000ADU if gain 6000ADU without}
RN entry {Read noise} 107 {Read noise in e- (std)}
pCIC entry {CIC} 0.01 {Vertical + horizontal charge induced current in e-/pix/frame}
sCIC entry {Serial CIC} 0.001 {Serial charge induced current in e-/pix/frame}
Dark entry {Dark current} 6e-5 {Dark current in e-/pix/sec}
Smearing entry {Smearing length} 1.5 {Smearing exponential folding length in pixel}
RateSmearing entry {Smearing length rate} 50000 {Smearing length exponential decrement (0 means constant smearing)}
Exposure entry {Exposure} 50 {Exposure time in seconds}
Flux entry {Flux} 1e-3 {Photo-electrons/pixel/seconds}
threshold entry {photo-counting threshold} 5.5 {Threshold/read noise to apply photo-counting}
Source menu {Source type} Flat-field|Spectra|Dirac|Slit|Fibre|Field1|Field2|Field3|Field4 {Choose the type of source in entry}
spectra entry {Spectra} - {Spectra of the source: wavelength[nm] for fist column, flux [erg/s/cm2/A] second column}
cube entry {Cube} - {Spatio-spectra intensity mock cube}
Rx entry {Spatial resolution} 8 {FWHM Spatial resolution in pixel}
Ry entry {Spectral resolution} 8 {FWHM l/dl Spectral resolution in pixel}
Name entry {Image name} Auto {Name of the image to ba saved in Home/DS9BackUp/CreatedImage/}
hist entry {Histogram path} - {Histogram csv file to compare to}
endparam


param Change-Config
exptime entry {Exposure} EXPTIME-EXPOSURE {Image header keywords for exposure}
temperature entry {Temperature} TEMP {Image header keywords for temperature}
gain entry {EmGain} EMGAIN {Image header keywords for amplification gain}
Overscan checkbox {Overscan region} 1 {Check if the detector have an overscan region}
physical_region entry {Physical limits} 1063-2125-0-2069 {Pixel limits of the physical detector xmin-xmax-ymin-ymax}
extension entry {Image extension} .fits {Image extension: eg. .FIT, .fits}
date entry {Format date} 'DATE' {Image header keywords for date}
format_date entry {Format date} '%y%m%d-%HH%Mm%Ss' {Date format in Image header}
verbose checkbox {Verbose} 0 {Verbose option}
ConversionGain entry {ConversionGain} 0.53 {Conversion gain of the detector}
Autocorr_region_1D entry {Autocorr region 1D} '1500-2000-1500-2000' {}
Autocorr_region_2D entry {Autocorr region 2D} '1500-2000-1500-2000' {}
#backup entry {Backup file} False {Path of the file where to save csv/plots/etc}
endparam


#param foobar
#var1 entry {Variable 1} default {this is a entry}
#var2 entry {Variable 1} default {this is a entry}
#var2 checkbox {Variable 2} 1 {this is a checkbox}
#var3 checkbox {Variable 3} 2 {thilkns is a checkbox}
#var4 menu {Variable 4} AAA|BBB|CCC {this is a menu}
#endparam

param radial_profile
center menu {Centering algorithm} Maximum|User|Center-of-mass|2x1D-Gaussian-fitting|2D-Gaussian-fitting {Algorithm used for centering.}
diam entry {Source diameter} 0 {Fiber diameter in pixel. 0 for pure gaussian fitting, else data will be fitted by (Disk * Gaussian)}
#log checkbox {Log} 0 {Log or linear plot}
endparam




param Lock
var1 menu {frame} image|none|wcs {}
var3 menu {crosshair} image|none|wcs {}
var2 checkbox {scalelimits} 1 {}
var4 checkbox {smooth} 0 {}
var5 checkbox {colorbar} 1 {}
endparam


param Images-to-analyze
path entry {RegExp Path} $filename {Paths of the images you want to analyse. Use global pattern matching (*/?/[9-16], etc)}
endparam

param Trimming
#system menu {Coordinate system} Image|Physical DS9 pixel coordinate system to use to extract the sub-image}
path entry {RegExp Path} $filename {Paths of the images you want to analyse. Use global pattern matching (*/?/[9-16], etc)}
endparam

param Tutorials
tutorials menu {Tutorials} 1-Generic-Tools|2-Photometric-Analysis|3-Image-Quality-Assesment|4-Image-Processing|5-All-In-One {Choose the tutorial you want to do.}
endparam

param Throughfocus
Path open {RegExp Path} "" {Paths of the images you want to analyse. Use global pattern matching (*/?/[], etc)}
sort menu {Sorting type} 	AlphaNumerical|CreationDate|DS9-Order {Way to sort files to create throughfocus profile}
WCS checkbox {WCS} 0 {Perform throughfocus using WCS coordinates (when drifting on sky)}
offsets entry {Steps} "" {If throughfocus images not taken uniformely, provide the offset of each image separated by a coma, eg: 0,0.5,2,3}
endparam

param Click-Enter-For-Only-DS9-Image
all checkbox {All images} 0 {Check this box to run the analysis on all the images of the repository}
b entry {First image} - {Number of the first image to process}
e entry {Last image} - {Number of the last image to process}
list entry {List of images number} - {List of all the images to process. Eg: 5-12-23}
path entry {RegExp Path} - {Linux like path of the the images to process. eg: /tmp/foler_??-??-??/[1-13].fits}
endparam




param subset_
#cat entry {Input Header catalog} - {Path of the input header catalog to filter/organize files}
cat open {Input Header catalog} {$env(HOME)/DS9QuickLookPlugIn/HeaderDataBase/} {Path of the input header catalog to filter/organize files}
Mask entry {Selection} "" {Selection to be applied.  Use \| for OR and \& for AND eg: ((FLUX*EXPTIME>1) \& (FLUX*EXPTIME<30)) \| (EMGAIN>0) }
Fields entry {Re-arange} Directory {Coma separated fields, order matters for folder creation. eg: Directory,NAXIS2}
#number menu {Number of images} all|1|2|5|10|100 {Number of images having the same characteristics}
endparam

param autocorr
type menu {Type} 2D-XY|X|Y {Choose autocorrelation type}
path entry {RegExp Path} $filename {Paths of the images you want to analyse. Use global pattern matching (*/?/[9-16], etc)}
endparam












param Header-Catalog
#path entry {RegExp Path} $filename {Path of the images to extract.  Use global pattern matching (*/?/[9-16], etc)}
path open {RegExp Path} {$env(HOME)/*fits} {Path of the images to extract.  Use global pattern matching (*/?/[9-16], etc)}
info menu {Info} |basic_image_estimators.py|FIREBall.py {Macros file to add image estimators to header catalog, takes more time. Leave blank for no image analysis}
#ext entry {Ext} 0 {Header extensions to be extracted: eg. 0,1,2,3}
endparam


param CreateHeader
Field entry {Header} - {Header field to which add value}
Value entry {Value} - {Value to add}
Comment entry {Comment} - {Comment to add}
#path entry {RegExp Path} $filename {Paths of the images you want to analyse. Use global pattern matching (*/?/[9-16], etc)}
#path open {RegExp Path} {$env(HOME)} {Paths of the images you want to analyse. Use global pattern matching (*/?/[9-16], etc)}
endparam

param SmearingAutocorr
autocorr menu {Autocorellation} X|2D-xy {Autocorrrelation type}
endparam






param ReplaceByNaNs
top entry {Size y+} 0 {Number of pixels to mask in the y+ direction}
bottom entry {Size y-} 0 {Number of pixels to mask in the y- direction}
left entry {Size x-} 4 {Number of pixels to mask in the x- direction}
right entry {Size x+} 0 {Number of pixels to mask in the x+ direction}
endparam

param Throw-Apertures
number entry {Number of apertures} 1000 {}
size entry {Size of apertures} 10,10 {pixels}
form menu {Apetures'forme} box|circle {}
spacing menu {Apeture's position} Random|Equidistributed {}
endparam


param LostInSpace
Image menu {Type} Image|XY-catalog {If Image, upload the image, else upload the used defined DS9 regions as jsoned fits catalog!}
scale_units menu {scale_units} |degwidth|arcminwidth|arcsecperpix|focalmm {The units for the scale_lower and scale_upper arguments becomes the scale-units argument to solve-field on the server side}
#scale_type menu {scale_type} ul|ev {Set ul if you are going to provide scale_lower and scale_upper arguments, or ev if you are going to provide scale_est and scale_err error percentage  arguments.}
scale_lower entry {scale_lower} "" {The lower-bound of the scale of the image.}
scale_upper entry {scale_upper} "" {The upper-bound of the scale of the image.}

scale_est entry {scale_estimate} "" {The estimated scale of the image.}
scale_err entry {scale_error} "" {0 to 100. The error (percentage) on the estimated scale of the image.}
center_ra entry {center_ra} "" {float, 0 to 360, in degrees. The position of the center of the image}
center_dec entry {center_dec} "" {float, -90 to 90, in degrees. The position of the center of the image}

radius entry {radius} "" {float, in degrees.}
downsample_factor entry {downsample_factor} "" {float, >1. Downsample (bin) your image by this factor before performing source detection. This often helps with saturated images, noisy images, and large images. 2 and 4 are commonly-useful values.}
tweak_order menu {tweak_order} 2|1|3|4|5 {Polynomial degree order for distortion correction. Orders>2 may produce totally bogus results high-order polynomials are strange beasts.}
#use_sextractor menu {use_sextractor} True|False {Use the SourceExtractor program to detect stars, not our built-in program.}

crpix_center menu {crpix_center} False|True {Set the WCS reference position to be the center pixel in the image. By default the center is the center of the quadrangle of stars used to identify the image.}
parity checkbox {parity} 0 {0 means that the sign of the determinant of the WCS CD matrix is positive, 1 means negative.}
#image_width entry {image_width} "" {int, only necessary if you are submitting an x,y list of source positions}
#image_height entry {image_height} "" {int, ditto.}
positional_error entry {positional_error} "" {float, expected error on the positions of stars in your image}
#test $filedialog(open) {fielane} 0 {float}
endparam



param Background-Subtraction
sigma entry {Sigma clipping} 3 {The number of standard deviations to use for both the lower and upper clipping limit}
bckd menu {Background estimator} MeanBackground|MedianBackground|ModeEstimatorBackground|MMMBackground|SExtractorBackground|BiweightLocationBackground {Different background estimators that can be used}
rms menu {RMS estimator} StdBackgroundRMS|MADStdBackgroundRMS|BiweightScaleBackgroundRMS {Different RMS estimators that can be used}
filter entry {Filter size} 3,3 {The window size of the 2D median filter to apply to the low-resolution background map}
box entry {Box size} 40,40 {Size of the box to be used}
percentile entry {Percentile} 20 {Percentile of the image to exclude in the background estimation}
mask checkbox {Masking sources} 0 {Check this and fill following entries to detect and mask sources found with these settings}
snr entry {snr} 3 {The snr per pixel above the background for which to consider a pixel as possibly being part of a source}
npixels entry {npixels} 3 {The number of connected pixels, each greater than threshold, that an object must have to be detected.}
dilate entry {dilate} 5 {The size of the square array used to dilate the segmentation image.}
#path entry {RegExp Path} $filename {Paths of the images you want to analyse. Use global pattern matching (*/?/[9-16], etc)}
endparam


param Source-Extraction
erosion-dilatation entry {Erosion-dilatation size} 2 {Percentile of the image to exclude in the background estimation}
threshold entry {Detection threshold / sigma} 10 {The number of standard deviations above which to select sources. Enter eg. 10,15 to loop on threshold}
fwhm entry {Sources FWHM} 8 {The full-width half-maximum (FWHM) of the major axis of the Gaussian kernel in pixels. Enter eg. 8,10 to loop on FWHM}
theta entry {Angle} 0 {The position angle (in degrees) of the major axis of the Gaussian kernel measured counter-clockwise from the positive x axis}
iters entry {Iteration} 5 {The number of iterations to perform sigma clipping, or None to clip until convergence is achieved when calculating the statistics}
ratio entry {Gaussian ratio} 1 {The ratio of the minor to major axis standard deviations of the Gaussian kernel}
delete-doublons entry {Minimal distance} 30 {When entering several thresholds/FWHMs, the minimal distance between two sources in order to delete duplicates}
#path entry {RegExp Path} - {Paths of the images you want to analyse. Use global pattern matching (*/?/[9-16], etc)}
endparam



param Stacking
Path entry {RegExp Path} $filename {Path of the images to stack (glob syntax. eg. /tmp/images00[12]?.fits)}
stack menu {Stacking type} mean_float|mean_int|median_int|median_float|1/std-wheighted {Type of stacking to perform, mask will only be taken into account with float.}
#clipping entry {Clipping} - {Number of sigma to clip out before staking}
output entry {Output name} stacked_image.fits {Path of the stack image, in the repository of the first image.}
endparam


param Cosmic-Rays
threshold entry {Detection threshold} 50000 {Detection threshold for cosmic rays}
mask menu {Masking factor} 1|2|3|4|5|6|7|8|9|10 {Masking factor of the cosmics. The higher the bigger will be the mask}
all_line checkbox {Masking entirely} 0 {Masking all the line on the left side of the impact}
tail menu {Tail direction} -x|+x|-y|+y {Direction of the tail of the cosmic to corect for its impact}
path entry {RegExp Path} - {Paths of the images you want to analyse. Use global pattern matching (*/?/[9-16], etc)}
endparam











#param EmGain
#subtract checkbox {Subtract Image} 0 {Subtract image to have better assesment of the variance}
#number entry {Number/path} - {Number/path's image to subtract, let - to automatically take the +/- consecutive image}
#box entry {Bin's size} 30,30 {Size of the bins on which compute the variance and intensity}
#overscan menu {Overscan regions} 2|1 {Choose the number of overscan region you want to use}
#limits entry {Overscan limits} 50,400,2200,2400 {Limits of the overscan region on which you want to calculate the average}
#endparam






param Visualization
fixed checkbox {Fixed scale} 1 {Save the images with a variable scale}
variable checkbox {Variable scale} 1 {Save the images with a fixed scale to compare different illuminations}
counts checkbox {Counts} 1 {Save the image in ADU per pixel}
flux checkbox {Flux} 1 {Save the image in ADU per second per pixel}
endparam


param Background-Fit-1D
#axis menu {Direction} x|y {Variation direction to be analyzed}
background menu {Background deg} Constant|None|slope|Exponential|DoubleExponential|Logarithmic {Shape of the background}
#law menu {Law} None|Exponiential|DoubleExponiential {Law used to fit the background}
gaussians menu {Number of Gaussians} 0|1|2|3|4|5 {Number of features to be fitted by a gaussian}
moffats menu {Number of Moffats} 0|1|2|3 {Number of features to be fitted by a moffat}
voight menu {Number of Voight} 0|1|2|3 {Number of features to be fitted by a voight}
#sinusoid menu {Number of Sinusoids} 0|1|2 {Add sinusoids to the fitting signal}
other menu {Other features} None|EMCCD_Histogram|Black_Body|Schechter|Double-Schechter {Add sinusoids to the fitting signal}
#kernel entry {kernel} 1 {int, Convolution kenel}
#Value menu {Value} Linear|Log {Fit in linear or log value}
endparam



param Gaussian-Fit-2D
FWHM entry {FWHM} - {FWHM limits in pixel for the fit. Eg: 6-7}
Center checkbox {Center} 0 {Force the fit on the central pixel}
noise checkbox {Noise measurement} 0 {To do the measurement on 100 random positions}
endparam


param -Click-Enter-For-Only-DS9-Image-
log checkbox {Log 10} 1 {Plot the histogram in log}
range entry {Range} 2500-10000 {Range of the histogram, write - for automatic plot}
all checkbox {All images} 0 {Check this box to run the analysis on all the images of the repository}
b entry {First image} - {Number of the first image to process}
e entry {Last image} - {Number of the last image to process}
list entry {List of images number} - {List of all the images to process. Eg: 5-12-23}
path entry {Path of a folder} - {Linux like path of the the images to process. eg: /tmp/foler_??-??-??/[1-13].fits}
stack checkbox {Only on stacked} 0 {Run analysis only on stacked images }
endparam


param Convolution
type menu {Type} Gaussian|Box|Image {Shape of the convolution kernel}
pat_c entry {path} - {Path of the 2D fits convolution kernel}
sizex entry {Size x} 1.5,1.5 {Box's or gaussian's std size in the x,y direction (must be int odd number for box!)}
#sizey entry {Size y} 3 {Box's or gaussian's std size in the y direction (must be odd number for box!)}
path entry {RegExp Path} $filename {Paths of the images you want to analyse. Use global pattern matching (*/?/[9-16], etc)}
endparam



param Catalog-to-region
path open {Path} "" {Path of the catalog}
fields entry {x,y fields} "" {Name of the x and y fields: ex = xcentroid,ycentroid}
name entry {field name} "" {field to put in region name: ex = magnitude, name, etc}
form menu {form of the region} circle|box {Form of the regions to display}
size entry {Regions size} 10 {Size in pixel or arcseconds}
wcs checkbox {WCS} 0 {Check if the catalog fields are in degree-WCS, then radius must be in arc-second}
Selection entry {[Selection]} "" {selection of the region in th catalog: Use | for OR and \& for AND}
endparam



param SEXTRACTOR
DETECTION_IMAGE open {DETECTION_IMAGE} "" {Image to use for detection of the sources. If - using same than photometric image, eg. DS9 frame}
CATALOG_NAME save {CATALOG_NAME} "" {Name of the output catalog without extension. eg /tmp/catalog.fits, if -, saved as $filename_ds9_cat.fits}
CATALOG_TYPE menu {CATALOG_TYPE} FITS_1.0|NONE|ASCII|ASCII_HEAD|ASCII_SKYCAT|ASCII_VOTABLE|FITS_LDAC {Type of the output catalog}
PARAMETERS_NAME menu {PARAMETERS_NAME} sex.param|sex_vignet.param|sex_all.param {File name in ds9_package/Calibration/Sextractor/}

DETECT_TYPE menu {DETECT_TYPE} CCD|PHOTO {CCD (linear) or PHOTO (with gamma correction)}
DETECT_MINAREA entry {DETECT_MINAREA} 10 {}
#DETECT_MAXAREA entry {DETECT_MAXAREA} - {}
THRESH_TYPE menu {THRESH_TYPE} RELATIVE|ABSOLUTE {}
DETECT_THRESH entry {DETECT_THRESH} 0.8 {Detection threshold. 1 argument: ADUs or relative to Background RMS, see THRESH TYPE}
ANALYSIS_THRESH entry {ANALYSIS_THRESH} 2.0 {}

FILTER checkbox {FILTER} 1 {apply filter for detection (Y or N)?}
FILT_NAME menu {FILTER_NAME} gauss_4.0_7x7.conv|NONE|gauss_1.5_3x3.conv|gauss_2.0_3x3.conv|gauss_2.0_5x5.conv|gauss_2.5_5x5.conv|gauss_3.0_5x5.conv|gauss_3.0_7x7.conv|gauss_4.0_7x7.conv|gauss_5.0_9x9.conv|mexhat_1.5_5x5.conv|mexhat_2.0_7x7.conv|mexhat_2.5_7x7.conv|mexhat_3.0_9x9.conv|mexhat_4.0_9x9.conv|mexhat_5.0_11x11.conv|block_3x3.conv|tophat_1.5_3x3.conv|tophat_2.0_3x3.conv|tophat_2.5_3x3.conv|tophat_3.0_3x3.conv|tophat_4.0_5x5.conv|tophat_5.0_5x5.conv|default.conv {Name of the sextractor filter in ds9_package/Calibration/Sextractor/, NONE for no filter}

DEBLEND_NTHRESH entry {DEBLEND_NTHRESH} 64 {Number of deblending sub-thresholds}
DEBLEND_MINCONT entry {DEBLEND_MINCONT} 0.0003 {Minimum contrast parameter for deblending}

CLEAN_T checkbox {CLEAN} 1 {Clean spurious detections? (Y or N)?}
CLEAN_PARAM entry {CLEAN_PARAM} 1.0 {Cleaning efficiency, 0 for no cleaning}
MASK_TYPE menu {MASK_TYPE} CORRECT|NONE|BLANK {type of detection MASKing}

WEIGHT_TYPE menu {WEIGHT_TYPE} NONE|NONE,MAP_VAR|MAP_VAR|MAP_VAR,MAP_VAR {First one for detection image, second one for photometric image}
WEIGHT_IMAGE entry {WEIGHT_IMAGE} "" {}
#RESCALE_WEIGHTS checkbox {RESCALE_WEIGHTS} 0 {}

#FLAG_IMAGE entry {FLAG_IMAGE} - {}
#FLAG_TYPE menu {FLAG_TYPE} MAX|MIN|? {}

PHOT_APERTURES entry {PHOT_APERTURES} 6,12,18 {MAG_APER aperture diameter(s) in pixels}
PHOT_AUTOPARAMS entry {PHOT_AUTOPARAMS} 2.5,4.0 {MAG_AUTO parameters: <Kron_fact>,<min_radius>}
PHOT_PETROPARAMS entry {PHOT_PETROPARAMS} 2.0,4.0 {MAG_PETRO parameters: <Petrosian_fact>}
PHOT_FLUXFRAC entry {PHOT_FLUXFRAC} 0.3,0.5,0.9 {flux fraction[s] used for FLUX_RADIUS}
#SATUR_LEVEL entry {SATUR_LEVEL} - {level (in ADUs) at which arises saturation}
MAG_ZEROPOINT entry {MAG_ZEROPOINT} 0.0 {magnitude zero-point}
#MAG_GAMMA entry {MAG_GAMMA} - {gamma of emulsion (for photographic scans)}
#GAIN entry {GAIN} - {detector gain in e-/ADU}
PIXEL_SCALE entry {PIXEL_SCALE} 0 {size of pixel in arcsec (0=use FITS WCS info)}

SEEING_FWHM entry {SEEING_FWHM} 0.8 {stellar FWHM in arcsec}
STARNNW_NAME entry {STARNNW_NAME} default.nnw {File name in ds9_package/Calibration/Sextractor/}

BACK_TYPE menu {BACK_TYPE} AUTO|MANUAL {}
BACK_SIZE entry {BACK_SIZE} 64 {Background mesh: <size> or <width>,<height>}
BACK_FILTERSIZE entry {BACK_FILTERSIZE} 3 {Background filter: <size> or <width>,<height>}
BACKPHOTO_TYPE menu {BACKPHOTO_TYPE} LOCAL|GLOBAL {}
BACKPHOTO_THICK entry {BACKPHOTO_THICK} 24 {thickness of the background LOCAL annulus}
BACK_FILTTHRESH entry {BACK_FILTTHRESH} 0.0 {Threshold above which the background map filter operates}

CHECKIMAGE_TYPE menu {CHECKIMAGE_TYPE} NONE|BACKGROUND|BACKGROUND_RMSMINIBACKGROUND|MINIBACK_RMS|-BACKGROUND|FILTERED|OBJECTS|-OBJECTS|SEGMENTATION|APERTURES {}
REGION_NAME menu {REGION_NAME} NUMBER|FWHM_IMAGE|MAG_AUTO|MAG_ISO|MAG_APER|MU_MAX|ELLIPTICITY|CLASS_STAR|THETA_IMAGE|ELONGATION {The name you want to display above each source on DS9}
endtab
endparam










param PSFex


ENTRY_PATH entry {ENTRY_CAT} - {Linux path of the FITS_LDAC (!!!) entry catalogs. Can contain * and ?}
BASIS_TYPE menu {BASIS_TYPE} PIXEL_AUTO|NONE|PIXEL|GAUSS-LAGUERRE|FILE {}
BASIS_NUMBER entry {BASIS_NUMBER} 20 {Basis number or parameter}
PSF_SAMPLING entry {PSF_SAMPLING} 1.0 {Sampling step in pixel units (0.0 = auto)}
PSF_ACCURACY entry {PSF_ACCURACY} 0.01 {Accuracy to expect from PSF "pixel" values}
PSF_SIZE entry {PSF_SIZE} 45,45 {Image size of the PSF model}

CENTER_KEYS entry {CENTER_KEYS} X_IMAGE,Y_IMAGE {Catalogue parameters for source pre-centering}
PHOTFLUX_KEY entry {PHOTFLUX_KEY} FLUX_APER(2) {Catalogue parameter for photometric norm.}
PHOTFLUXERR_KEY entry {PHOTFLUXERR_KEY} FLUXERR_APER(2) {Catalogue parameter for photometric error}
PSFVAR_KEYS entry {PSFVAR_KEYS} X_IMAGE,Y_IMAGE {Catalogue or FITS (preceded by :) params}
PSFVAR_GROUPS entry {PSFVAR_GROUPS} 1,1 {Group tag for each context key}
PSFVAR_DEGREES menu {PSFVAR_DEGREES} 0|1|2|3|4 {Polynom degree for each group}

SAMPLE_AUTOSELECT checkbox {SAMPLE_AUTOSELECT} 1 {Automatically select the FWHM?}
SAMPLEVAR_TYPE menu {SAMPLEVAR_TYPE} SEEING|NONE {File-to-file PSF variability}
SAMPLE_FWHMRANGE entry {SAMPLE_FWHMRANGE} 2.0,10.0 {Allowed FWHM range}
SAMPLE_VARIABILITY entry {SAMPLE_VARIABILITY} 0.2 {Allowed FWHM variability (1.0 = 100%)}
SAMPLE_MINSN entry {SAMPLE_MINSN} 20 {Minimum S/N for a source to be used}
SAMPLE_MAXELLIP entry {SAMPLE_MAXELLIP} 0.3 {Maximum (A-B)/(A+B) for a source to be used}

HOMOBASIS_TYPE menu {HOMOBASIS_TYPE} GAUSS-LAGUERRE|NONE {GAUSS_LAGUERRE or no homogeneisation is computed}
HOMOPSF_PARAMS entry {HOMOPSF_PARAMS} 5.3,2.5 {Moffat FWHM and B parameter of the idealized target PSF chosen for homogeneisation}

CHECKPLOT_DEV menu {CHECKPLOT_DEV} PNG|XWIN|TK|PS|PSC|XFIG|JPEG|AQT|PDF|SVG {}
CHECKPLOT_TYPE menu {CHECKPLOT_TYPE} NONE|FWHM|ELLIPTICITY|COUNTS|COUNT_FRACTION|CHI2|RESIDUALS {or NONE}
CHECKPLOT_NAME entry {CHECKPLOT_NAME} check-plot {CHeck-plot name}

CHECKIMAGE_TYPE menu {CHECKIMAGE_TYPE} CHI|PROTOTYPES|SAMPLES|RESIDUALS|SNAPSHOTS|MOFFAT|-MOFFAT|-SYMMETRICAL {}
CHECKIMAGE_NAME entry {CHECKIMAGE_NAME} check.fits {Group tag for each context key}
PSF_DIR entry {PSF_DIR} . {Where to write PSFs (empty=same as input)}


WRITE_XML menu {WRITE_XML} 1|0 {}
XML_NAME entry {XML_NAME} psfex.xml {Filename for XML output}
NTHREADS entry {NTHREADS} 2 {Number of simultaneous threads for the SMP version of PSFEx, 0 = automatic}
Selection entry {[Selection]} - {Selection of the objetcs in th catalog: Use | for OR and \& for AND}

endparam








param Convertissor
Value entry {Value} 1 {Value to convert}
Unit1 entry {Unit 1} - {Unit of the value}
Unit2 entry {Unit 2} - {Unit for convertion}
Redshift entry {Redshift} - {Only if needed}
endparam


param Distance-Convertissor
Value entry {Value} 1 {Value to convert}
Unit1 menu {Unit 1} ---DISTANCE---|angstrom|meter|parsec|astronomical_unit|lightyear|---ENERGY---|Joule|erg|Ry|cal|eV|---MASS---|kg|earthMass|M_e|M_p|Msun|lb|oz|---MAGNITUDE--- {Unit of the value}
Unit2 menu {Unit 2} ---DISTANCE---|angstrom|meter|parsec|astronomical_unit|lightyear|---ENERGY---|Joule|erg|Ry|cal|eV|---MASS---|kg|earthMass|M_e|M_p|Msun|lb|oz|---MAGNITUDE--- {Unit for conversion}
Redshift entry {Redshift} - {Only if needed}
endparam




param Centering
method menu {Method} Maximum|Center-of-mass|2x1D-Gaussian-fitting|2D-Gaussian-fitting {Method for centroiding} #|Gaussian-Picouet
#background checkbox {Background subtraction} 0 {Apply of not background subtraction before centering}
endparam



param Python-Command
exp open {Expression} ds9 {Python expression for exec method (eg. ds9=ds9-image)}#. See doc for exemples (convolution, adding noise, masking, trimming).
#im_path entry {image} "" {Optional path of a second image to use}
#eval checkbox {SimpleEval} 0 {Use the SimpleEval method in order to minimize possible execution risks (see doc).}
#path entry {RegExp Path} $filename {Write a regexp if you want to run the above expression on multiple images matching this pattern.}
overwrite checkbox {Overwrite} 0 {Overwrite the modification on the original file.}#USE WITH CAUTION!
endparam


param Conversion
scaling checkbox {Rescaling min max} 0 {Rescale values of fits image to spouse chosen type}#|Gaussian-Picouet
type menu {BITPIX-Type} 8,uint8|16,int16|32,int32|64,int64|-32,float32|-64,float64 {}
#path entry {Regexp path not implemented} - {Write a regexp if you want to run the above expression on multiple images matching this pattern.}
endparam


###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################
###########################################################################################################################################





param Save
var1 entry {path 1} - {Path of the red image eg. R band}
var2 entry {path 2} - {Path to the green image eg. G band}
var3 entry {path 3} - {Path to the blue image eg. U band}
var4 entry {Name to save} /tmp/test.tiff {Name for the image to save. Will be saved in the dame repository}
endparam

param Gaussian-Fit-1D
type menu {Datatype} BoxRegion|ProjectionRegion {If projection, other parameters should be ignored and the profile saved in HOME+/DS9BackUp/DS9Curves/ds9.dat}
axis menu {Direction} y|x {Variation direction to be analyzed if Box}
kernel entry {Convolution Kernel} 1 {Kernel to be convolved to the signal}
FWHM entry {FWHM} - {FWHM limits in pixel for the fit. Eg: 6-7}
Center checkbox {Center} 0 {Force the fit on the central pixel}
noise checkbox {Noise measurement} 0 {Run the analysis on 200 random position}
endparam




param CreateHeaderCat
catalog entry {Catalog path} - {Path catalog}
Field entry {Catalog Field} - {Will be saved with same name in image header}
timediff entry {Time difference} 0 {-1 if hour Temp is 10 when hour image is 11}
formatImage entry {Image time format} - {Image time format: Derive it automatically if -}
formatCat entry {Catalog time format} - {Catalog time format: Derive it automatically if -}
endparam



param -Click-Enter-For-Only-DS9-Image-
log checkbox {Log 10} 1 {Plot the histogram in log}
range entry {Range} 2500-10000 {Range of the histogram, write - for automatic plot}
all checkbox {All images} 0 {Check this box to run the analysis on all the images of the repository}
b entry {First image} - {Number of the first image to process}
e entry {Last image} - {Number of the last image to process}
list entry {List of images number} - {List of all the images to process. Eg: 5-12-23}
path entry {RegExp Path} - {Linux like path of the the images to process. eg: /tmp/foler_??-??-??/.fits}
stack checkbox {Only on stacked} 0 {Run analysis only on stacked images }
endparam




param SEXTRACTOR-NEW
DETECTION_IMAGE open {DETECTION_IMAGE} "" {Image to use for detection of the sources. If none using same than photometric image, eg. DS9 frame}

CATALOG_NAME save {CATALOG_NAME} "" {Name of the output catalog without extension. eg /tmp/catalog.fits, if none, saved as $filename_ds9_cat.fits}
CATALOG_TYPE menu {CATALOG_TYPE} FITS_1.0|NONE|ASCII|ASCII_HEAD|ASCII_SKYCAT|ASCII_VOTABLE|FITS_LDAC {Type of the output catalog}
PARAMETERS_NAME menu {PARAMETERS_NAME} sex.param|sex_vignet.param|sex_all.param {File name in ds9_package/Calibration/Sextractor/}

DETECT_TYPE menu {DETECT_TYPE} CCD|PHOTO {CCD (linear) or PHOTO (with gamma correction)}
DETECT_MINAREA entry {DETECT_MINAREA} 10 {min number of pixels above threshold}

DETECT_MAXAREA entry {DETECT_MAXAREA} 0 {max number of pixels above threshold (0=unlimited)}
THRESH_TYPE menu {THRESH_TYPE} RELATIVE|ABSOLUTE {}
DETECT_THRESH entry {DETECT_THRESH} 0.8 {Detection threshold. 1 argument: ADUs or relative to Background RMS, see THRESH TYPE}
ANALYSIS_THRESH entry {ANALYSIS_THRESH} 2.0 {}

FILTER checkbox {FILTER} 1 {apply filter for detection (Y or N)?}
FILT_NAME menu {FILTER_NAME} gauss_4.0_7x7.conv|NONE|gauss_1.5_3x3.conv|gauss_2.0_3x3.conv|gauss_2.0_5x5.conv|gauss_2.5_5x5.conv|gauss_3.0_5x5.conv|gauss_3.0_7x7.conv|gauss_4.0_7x7.conv|gauss_5.0_9x9.conv|mexhat_1.5_5x5.conv|mexhat_2.0_7x7.conv|mexhat_2.5_7x7.conv|mexhat_3.0_9x9.conv|mexhat_4.0_9x9.conv|mexhat_5.0_11x11.conv|block_3x3.conv|tophat_1.5_3x3.conv|tophat_2.0_3x3.conv|tophat_2.5_3x3.conv|tophat_3.0_3x3.conv|tophat_4.0_5x5.conv|tophat_5.0_5x5.conv|default.conv {Name of the sextractor filter in ds9_package/Calibration/Sextractor/, NONE for no filter}

DEBLEND_NTHRESH entry {DEBLEND_NTHRESH} 64 {Number of deblending sub-thresholds}
DEBLEND_MINCONT entry {DEBLEND_MINCONT} 0.0003 {Minimum contrast parameter for deblending}

CLEAN_T checkbox {CLEAN} 1 {Clean spurious detections? (Y or N)?}
CLEAN_PARAM entry {CLEAN_PARAM} 1.0 {Cleaning efficiency, 0 for no cleaning}
MASK_TYPE menu {MASK_TYPE} CORRECT|NONE|BLANK {type of detection MASKing}


WEIGHT_TYPE menu {WEIGHT_TYPE} NONE|NONE,MAP_VAR|MAP_VAR|MAP_VAR,MAP_VAR {First one for detection image, second one for photometric image}
RESCALE_WEIGHTS checkbox {RESCALE_WEIGHTS} 1 {Rescale input weights/variances }
WEIGHT_IMAGE open {WEIGHT_IMAGE} "" {weight-map filename}
WEIGHT_GAIN checkbox {WEIGHT_GAIN} 1 {modulate gain (E/ADU) with weights? }

FLAG_IMAGE open {FLAG_IMAGE} NONE {filename for an input FLAG-image}
FLAG_TYPE menu {FLAG_TYPE} OR|AND|MAX|MIN|MOST {flag pixel combination}

PHOT_APERTURES entry {PHOT_APERTURES} 6,12,18 {MAG_APER aperture diameter(s) in pixels}
PHOT_AUTOPARAMS entry {PHOT_AUTOPARAMS} 2.5,4.0 {MAG_AUTO parameters: <Kron_fact>,<min_radius>}
PHOT_PETROPARAMS entry {PHOT_PETROPARAMS} 2.0,4.0 {MAG_PETRO parameters: <Petrosian_fact>}
PHOT_FLUXFRAC entry {PHOT_FLUXFRAC} 0.3,0.5,0.9 {flux fraction[s] used for FLUX_RADIUS}

SATUR_LEVEL entry {SATUR_LEVEL} 50000.0 {level (in ADUs) at which arises saturation}
SATUR_KEY entry {SATUR_KEY} SATURATE {keyword for saturation level (in ADUs)}
MAG_ZEROPOINT entry {MAG_ZEROPOINT} 0.0 {magnitude zero-point}
MAG_GAMMA entry {MAG_GAMMA} 4.0 {gamma of emulsion (for photographic scans)}
GAIN entry {GAIN} GAIN {detector gain in e-/ADU}
PIXEL_SCALE entry {PIXEL_SCALE} 0 {size of pixel in arcsec (0=use FITS WCS info)}

SEEING_FWHM entry {SEEING_FWHM} 0.8 {stellar FWHM in arcsec}
STARNNW_NAME entry {STARNNW_NAME} default.nnw {File name in ds9_package/Calibration/Sextractor/}
CHECKIMAGE_TYPE menu {CHECKIMAGE_TYPE} NONE|BACKGROUND|BACKGROUND_RMSMINIBACKGROUND|MINIBACK_RMS|-BACKGROUND|FILTERED|OBJECTS|-OBJECTS|SEGMENTATION|APERTURES {}
REGION_NAME menu {REGION_NAME} NUMBER|FWHM_IMAGE|MAG_AUTO|MAG_ISO|MAG_APER|MU_MAX|ELLIPTICITY|CLASS_STAR|THETA_IMAGE|ELONGATION {The name you want to display above each source on DS9}


BACK_TYPE menu {BACK_TYPE} AUTO|MANUAL {}
BACK_VALUE entry {BACK_VALUE} 0.0 {Default background value in MANUAL mode}

BACK_SIZE entry {BACK_SIZE} 64 {Background mesh: <size> or <width>,<height>}

BACK_FILTERSIZE entry {BACK_FILTERSIZE} 3 {Background filter: <size> or <width>,<height>}

BACKPHOTO_TYPE menu {BACKPHOTO_TYPE} LOCAL|GLOBAL {}
BACKPHOTO_THICK entry {BACKPHOTO_THICK} 24 {thickness of the background LOCAL annulus}
BACK_FILTTHRESH entry {BACK_FILTTHRESH} 0.0 {Threshold above which the background map filter operates}


MEMORY_OBJSTACK entry {MEMORY_OBJSTACK} 3000 {number of objects in stack}
MEMORY_PIXSTACK entry {MEMORY_PIXSTACK} 300000 {number of pixels in stack}
MEMORY_BUFSIZE entry {MEMORY_BUFSIZE} 1024 {number of lines in buffer}
#NTHREADS menu {NTHREADS} 1|2|4|8|16|32 {Number of threads for multi processing}


endparam
