def create_specsheet(conjugate_type, **inputs): if conjugate_type == 'finite': # setup finite conjugate defaults fev = create_etendue_dict() fev['field']['object'] = dict([('height', None)]) fev['aperture']['object'] = dict([('f/#', None), ('NA', None)]) fev['field']['image'] = dict([('height', None)]) fev['aperture']['image'] = dict([('f/#', None), ('NA', None)]) fss = SpecSheet('finite', etendue_values=fev, **inputs) return fss elif conjugate_type == 'infinite': # setup infinite conjugate defaults imager_inputs = {'s': -math.inf} imager = IdealImager(None, -math.inf, None, None, None) iev = create_etendue_dict() iev['field']['object'] = dict([('angle', None)]) iev['aperture']['object'] = dict([('pupil', None)]) iev['field']['image'] = dict([('height', None)]) iev['aperture']['image'] = dict([('f/#', None), ('NA', None)]) ifss = SpecSheet('infinite', imager=imager, imager_inputs=imager_inputs, frozen_imager_inputs=[True, True, True, True, False], etendue_values=iev, **inputs) return ifss else: print('create_specsheet: conjugate_type not recognized', conjugate_type) return None
def __init__(self, conjugate_type, imager=None, imager_inputs=None, frozen_imager_inputs=None, etendue_inputs=None, etendue_values=None): self.conjugate_type = conjugate_type if imager is None: imager = IdealImager(None, None, None, None, None) self.imager = imager self.imager_inputs = imager_inputs if imager_inputs else {} self.frozen_imager_inputs = (frozen_imager_inputs if frozen_imager_inputs else [False]*5) self.etendue_inputs = (etendue_inputs if etendue_inputs else create_etendue_dict()) self.etendue_values = (etendue_values if etendue_values else create_etendue_dict()) self.partition_defined()
def create_new_optical_system(efl=10.0, fov=1.0): imager_inputs = {'s': -math.inf, 'f': efl} inf_conj_imgr = ideal_imager_setup(**imager_inputs) ei = create_etendue_dict() ei['field']['object']['angle'] = fov ssi = SpecSheet('infinite', imager=inf_conj_imgr, imager_inputs=imager_inputs, etendue_inputs=ei) opt_model = create_new_optical_model_from_specsheet(ssi) return opt_model
def create_new_optical_system(efl=10.0, epd=1, fov=1.0): imager_inputs = {'s': -math.inf, 'f': efl} inf_conj_imgr = ideal_imager_setup(**imager_inputs) ei = create_etendue_dict() ei['field']['object']['angle'] = fov ei['aperture']['object']['pupil'] = epd ssi = SpecSheet('infinite', imager=inf_conj_imgr, imager_inputs=imager_inputs, etendue_inputs=ei) opt_model = create_new_optical_model_from_specsheet(ssi) sr = opt_model.optical_spec.spectral_region sr.set_from_list([('F', 1), ('d', 1), ('C', 1)]) sr.reference_wvl = 1 return opt_model