;Function LoadExpInfo ; Create a structure describing the observation model (The timing of scenes, and which cameras participate in which scenes) ; ;Input ; orbit_info - An orbit_info structure as created by get_sim_orbit_info ; /params - Set to return an array of structures describing the other parameters to the sim_cloud_creator. ;Keyword input ; first_light_scenes - Number of scenes to take at first light, with only the forward camera ; first_light_cadence - Time between the start of exposures for each first light scene, in seconds ; first_light_pause - Time between start of last first light exposure and start of first primary science exposure, in seconds ; pri_science_scenes - Number of scenes to take with all four cameras ; pri_science_cadence - Time between the start of exposures for each primary science scene, in seconds ; term_scene_number - Primary science scene number of scene taken at terminator overflight (First pri science scene=0) ; mapping_pause - Time between start of last primary science exposure and start of first mapping exposure, in seconds ; mapping_scenes - Number of scenes to take mapping, with only the nadir cameras ; mapping_cadence - Time between the start of exposures for each mapping scene, in seconds ;Returns ; A named structure (expinfo) describing the observation model ; sec - Pointer to array of scene times, in GPS seconds ; secTerm - Time of northern terminator overflight, in GPS seconds ; img_mask - Pointer to array of image masks. Each is a bitfield, 1 means camera is used in this scene, 0 otherwise ; 1=PX,2=MX,4=PY,8=MY ; obs_type - Pointer to array of observation types. function loadexpinfo,orbit_info,params=params, $ first_light_scenes=first_light_scenes,first_light_cadence=first_light_cadence,first_light_pause=first_light_pause, $ pri_science_scenes=pri_science_scenes,pri_science_cadence=pri_science_cadence,term_scene_number=term_scene_number, $ mapping_pause=mapping_pause,mapping_scenes=mapping_scenes,mapping_cadence=mapping_cadence var_description={name:"",varname:"",low:0.0d,high:1.0d,type:0,default:1.0d} var_description=replicate(var_description,9) var_description[0]={name:"First light scenes", varname:"first_light_scenes", low: 0.0d, high: 10.0d , type: 2, default: 2.0d } var_description[1]={name:"First light cadence", varname:"first_light_cadence",low: 0.0d, high: 60.0d , type: 2, default: 43.0d } var_description[2]={name:"First light pause", varname:"first_light_pause", low: 0.0d, high: 60.0d , type: 2, default: 43.0d } var_description[3]={name:"Primary Science scenes", varname:"pri_science_scenes", low: 0.0d, high: 100.0d , type: 2, default: 25.0d } var_description[4]={name:"Primary Science cadence", varname:"pri_science_cadence",low: 0.0d, high: 60.0d , type: 2, default: 43.0d } var_description[5]={name:"Terminator scene number", varname:"term_scene_number", low:-100.0d, high: 100.0d , type: 2, default: 3.0d } var_description[6]={name:"Mapping pause", varname:"mapping_pause", low: 0.0d, high: 200.0d , type: 2, default:100.0d } var_description[7]={name:"Mapping scenes", varname:"mapping_scenes", low: 0.0d, high: 10.0d , type: 2, default: 2.0d } var_description[8]={name:"Mapping cadence", varname:"mapping_cadence", low: 0.0d, high: 200.0d , type: 2, default: 43.0d } if keyword_set(params) then begin return,var_description endif if n_elements(first_light_scenes) eq 0 then first_light_scenes= var_description[0].default; if n_elements(first_light_cadence) eq 0 then first_light_cadence=var_description[1].default; if n_elements(first_light_pause) eq 0 then first_light_pause= var_description[2].default; if n_elements(pri_science_scenes) eq 0 then pri_science_scenes= var_description[3].default; if n_elements(pri_science_cadence) eq 0 then pri_science_cadence=var_description[4].default; if n_elements(term_scene_number) eq 0 then term_scene_number= var_description[5].default; if n_elements(mapping_pause) eq 0 then mapping_pause= var_description[6].default; if n_elements(mapping_scenes) eq 0 then mapping_scenes= var_description[7].default; if n_elements(mapping_cadence) eq 0 then mapping_cadence= var_description[8].default; secExpN=double((indgen(pri_science_scenes)-term_scene_number)*pri_science_cadence) img_mask=intarr(pri_science_scenes)+15 obs_type=intarr(pri_science_scenes)+3 ;Observation type for primary science images if mapping_scenes gt 0 then begin secExpMapping=indgen(mapping_scenes)*mapping_cadence secExpMapping+=(secExpN[pri_science_scenes-1]+mapping_pause) secExpN=[secExpN,secExpMapping] img_mask=[img_mask,intarr(mapping_scenes)+12] obs_type=[obs_type,intarr(mapping_scenes)+4] ;Observation type for mapping scenes end if first_light_scenes gt 0 then begin secExpFirstLight=indgen(first_light_scenes)*first_light_cadence secExpFirstLight-=(secExpFirstLight[first_light_scenes-1]+first_light_pause) secExpFirstLight+=secExpN[0] secExpN=[secExpFirstLight,secExpN] img_mask=[intarr(first_light_scenes)+1,img_mask] obs_type=[intarr(first_light_scenes)+2,obs_type] ;Observation type for first light scenes end secExpN*=1d6; secExpN+=orbit_info.n_term return,{expinfo, $ sec: ptr_new(secExpN), $ secTerm: orbit_info.n_term, $ img_mask: ptr_new(img_mask), $ obs_type: ptr_new(obs_type) $ } end ; case model of ; "legacy": begin ; cipsCadence=43 ; cipsBeforeTerm=5 ; cipsFirstLight=0 ; cipsPrimary=25 ; cipsMapping=0 ; mappingPause=0; ; mappingCadence=0; ; end ; "Dave1": begin ; cipsCadence=43 ; cipsBeforeTerm=3 ; cipsFirstLight=2 ; cipsPrimary=27 ; cipsMapping=2 ; mappingPause=108; ; mappingCadence=108; ; end ; "Dave2": begin ; cipsCadence=43 ; cipsBeforeTerm=5 ; cipsFirstLight=0 ; cipsPrimary=30 ; cipsMapping=0 ; mappingPause=108; ; mappingCadence=108; ; end ; "test": begin ; cipsCadence=48 ; cipsBeforeTerm=5 ; cipsFirstLight=0 ; cipsPrimary=25 ; cipsMapping=0 ; mappingPause=0; ; mappingCadence=0; ; end ; "test2": begin ; cipsCadence=47 ; cipsBeforeTerm=5 ; cipsFirstLight=0 ; cipsPrimary=28 ; cipsMapping=0 ; mappingPause=0; ; mappingCadence=0; ; end ; "test3": begin ; cipsCadence=46 ; cipsBeforeTerm=5 ; cipsFirstLight=0 ; cipsPrimary=28 ; cipsMapping=0 ; mappingPause=0; ; mappingCadence=0; ; end ; end