function spinmodel_get_ptr,probe,use_eclipse_corrections=use_eclipse_corrections
common spinmodel_common, tha_std_obj, thb_std_obj, thc_std_obj,$
thd_std_obj, the_std_obj, thf_std_obj,$
tha_ecl_obj, thb_ecl_obj, thc_ecl_obj,$
thd_ecl_obj, the_ecl_obj, thf_ecl_obj,$
tha_full_obj, thb_full_obj, thc_full_obj,$
thd_full_obj, the_full_obj, thf_full_obj, init_flag
if n_elements(use_eclipse_corrections) EQ 0 then begin
use_eclipse_corrections=0
end
ptr = obj_new()
if n_elements(init_flag) EQ 0 then begin
dprint,'No spinmodel data is available for probe '+probe+'. Use thm_load_state,/get_support to load a spinmodel.'
return,obj_new()
endif
if (use_eclipse_corrections EQ 0) then begin
dprint,'No eclipse corrections.'
case probe of
'a': ptr=tha_std_obj
'b': ptr=thb_std_obj
'c': ptr=thc_std_obj
'd': ptr=thd_std_obj
'e': ptr=the_std_obj
'f': ptr=thf_std_obj
else: message,'Unrecognized probe identifier: expecting scalar character a,b,c,d,e, or f.'
endcase
endif else if (use_eclipse_corrections EQ 1) then begin
dprint,'Using partial eclipse corrections.'
case probe of
'a': ptr=tha_ecl_obj
'b': ptr=thb_ecl_obj
'c': ptr=thc_ecl_obj
'd': ptr=thd_ecl_obj
'e': ptr=the_ecl_obj
'f': ptr=thf_ecl_obj
else: message,'Unrecognized probe identifier: expecting scalar character a,b,c,d,e, or f.'
endcase
endif else begin
dprint,'Using full eclipse corrections.'
case probe of
'a': ptr=tha_full_obj
'b': ptr=thb_full_obj
'c': ptr=thc_full_obj
'd': ptr=thd_full_obj
'e': ptr=the_full_obj
'f': ptr=thf_full_obj
else: message,'Unrecognized probe identifier: expecting scalar character a,b,c,d,e, or f.'
endcase
endelse
if ~obj_valid(ptr) then begin
dprint,'No spinmodel data is available for probe '+probe+'. Use thm_load_state,/get_support to load a spinmodel.'
endif
return, ptr
end