;;; Code to generate the output times (listed in scale-factor) ;;; for Gadget snapshots. -- Manodeep Sinha (04/20/2012) compile_opt idl2,strictarrsubs ;; change these three parameters to your liking ;; z_start in the redshift of the first snapshot z_start = 25.0 ;; z_end should not be (too much) smaller than the stopping redshift ;; calculated by my powspec.pro code z_end = 0.0 nsnapshots = 128 ;; Benson 2011(12?) says 128 snapshots are required to resolve mass better than 5% ;; now the trivial binning - I prefer log a bins a_start = 1.0/(1+z_start) a_end = 1.0/(1+z_end) log_a_start = alog10(a_start) log_a_end = alog10(a_end) log_a_bin = (log_a_end-log_a_start)/(nsnapshots-1.0) log_a_output = log_a_start + findgen(nsnapshots)*log_a_bin a_output = 10.0d^log_a_output openw,lun,'OUTTIMES',/get_lun printf,lun,transpose(a_output) free_lun,lun print,n_elements(a_output),format='("Wrote ",I0," snapshot output times to OUTTIMES")' end