def load_camera(camera_id, world, stride=1): if camera_id == "DIVCAM-SXD": camera_config = load_calcam_calibration( '/home/mcarr/mastu/cameras/mug_divcam_sxd.nc') pixels_shape, pixel_origins, pixel_directions = camera_config camera = VectorCamera(pixel_origins[::stride, ::stride], pixel_directions[::stride, ::stride], parent=world) camera.spectral_bins = 15 return camera elif camera_id == "DIVCAM-ISP": camera_config = load_calcam_calibration( '/home/mcarr/mastu/cameras/mug_divcam_isp.nc') pixels_shape, pixel_origins, pixel_directions = camera_config camera = VectorCamera(pixel_origins[::stride, ::stride], pixel_directions[::stride, ::stride], parent=world) camera.spectral_bins = 15 return camera elif camera_id == "BULLET-MIDPLANE": camera_config = load_calcam_calibration( '/home/mcarr/mastu/cameras/mug_bulletb_midplane.nc') pixels_shape, pixel_origins, pixel_directions = camera_config camera = VectorCamera(pixel_origins[::stride, ::stride], pixel_directions[::stride, ::stride], parent=world) camera.spectral_bins = 15 return camera else: raise ValueError("MAST-U camera ID field is invalid.")
def load_kl1_camera(parent=None, pipelines=None): camera_config = load_calcam_calibration( '/home/mcarr/cherab/cherab_jet/cherab/jet/cameras/kl1/kl1-e4wc-sightlines.nc' ) if not pipelines: power_unfiltered = PowerPipeline2D(display_unsaturated_fraction=0.96, name="Unfiltered Power (W)") power_unfiltered.display_update_time = 15 pipelines = [power_unfiltered] pixels_shape, pixel_origins, pixel_directions = camera_config camera = VectorCamera(pixel_origins, pixel_directions, pipelines=pipelines, parent=parent) camera.spectral_bins = 15 camera.pixel_samples = 1 return camera
vessel = mesh.vessel # Pick emission models # d_alpha = Line(deuterium, 0, (3, 2)) # plasma.models = [ExcitationLine(d_alpha), RecombinationLine(d_alpha)] # d_gamma = Line(deuterium, 0, (5, 2)) # plasma.models = [ExcitationLine(d_gamma), RecombinationLine(d_gamma)] ciii_465 = Line(carbon, 2, ('2s1 3p1 3P4.0', '2s1 3s1 3S1.0')) plasma.models = [ExcitationLine(ciii_465)] # Select from available Cameras # camera_config = load_calcam_calibration('/home/mcarr/mastu/cameras/mug_bulletb_midplane.nc') # camera_config = load_calcam_calibration('/home/mcarr/mastu/cameras/mug_divcam_isp.nc') camera_config = load_calcam_calibration( '/home/mcarr/mastu/cameras/mug_divcam_sxd.nc') # RGB pipeline for visualisation rgb = RGBPipeline2D(display_unsaturated_fraction=0.96, name="sRGB") # Get the power and raw spectral data for scientific use. power_unfiltered = PowerPipeline2D(display_unsaturated_fraction=0.96, name="Unfiltered Power (W)") power_unfiltered.display_update_time = 15 # spectral = SpectralPowerPipeline2D() # Setup camera for interactive use... plt.ion() pixels_shape, pixel_origins, pixel_directions = camera_config camera = VectorCamera(pixel_origins, pixel_directions,
plasma.atomic_data = OpenADAS(permit_extrapolation=True) mesh = sim.mesh vessel = mesh.vessel # Pick emission models # d_alpha = Line(deuterium, 0, (3, 2)) # plasma.models = [ExcitationLine(d_alpha), RecombinationLine(d_alpha)] # d_gamma = Line(deuterium, 0, (5, 2)) # plasma.models = [ExcitationLine(d_gamma), RecombinationLine(d_gamma)] ciii_465 = Line(carbon, 2, ('2s1 3p1 3P4.0', '2s1 3s1 3S1.0')) plasma.models = [ExcitationLine(ciii_465)] # Select from available Cameras camera_config = load_calcam_calibration( '/home/mcarr/mastu/cameras/mug_bulletb_midplane.nc') # camera_config = load_calcam_calibration('/home/mcarr/mastu/cameras/mug_divcam_isp.nc') # camera_config = load_calcam_calibration('/home/mcarr/mastu/cameras/mug_divcam_sxd.nc') # RGB pipeline for visualisation rgb = RGBPipeline2D(display_unsaturated_fraction=0.96, name="sRGB") # Get the power and raw spectral data for scientific use. power_unfiltered = PowerPipeline2D(display_unsaturated_fraction=0.96, name="Unfiltered Power (W)") power_unfiltered.display_update_time = 15 # spectral = SpectralPowerPipeline2D() # Setup camera for interactive use... plt.ion() pixels_shape, pixel_origins, pixel_directions = camera_config