function hsi_timebin_evaluator,calibeventlist ;+ ; NAME: hsi_timebin_evaluator ; ; PURPOSE: ; To determine whether the HESSI modulation is undersampled ; ; INPUTS: ; calibrated event list structure ; ; OUTPUTS: ; Returns the number of indices per minimum cycle period, and ; if this is LT 2, prints a warning message. ; ; EJS Dec 16, 1999 ; ; Find the parameters of the modulation frequency ;- roll=calibeventlist.roll_angle phase_map_ctr=calibeventlist.phase_map_ctr amp_pha=ls_sin_cos(roll,phase_map_ctr,1.0,yfit,sigma,/amp_pha) rmin_cycle_period=2*!pi/amp_pha[0] ;=pitch/R (radians) imin_cycle_period=rmin_cycle_period*N_elements(roll)/(max(roll)-min(roll)) ; (indices) if imin_cycle_period LT 2 then begin min_angle_bin=(max(roll)-min(roll))*2/rmin_cycle_period message,'WARNING: shortest cycle_period='+string(imin_cycle_period)+' time bins',/info message,' You need at least'+strcompress(fix(min_angle_bin))+' angle bins',/info endif return,imin_cycle_period end