コード例 #1
0
import matplotlib.pyplot as plt
from raysect.optical import World

from cherab.aug.machine import plot_aug_wall_outline, import_mesh_segment, VESSEL, PSL, ICRH, DIVERTOR, A_B_COILS
from cherab.aug.bolometry import FDC_TUBE, FLX_TUBE, FVC_TUBE, FHS_TUBE, load_default_bolometer_config
from cherab.aug.bolometry import load_standard_inversion_grid

start_time = time.time()

# Load default inversion grid
grid = load_standard_inversion_grid()

# Calculate FLX camera sensitivities
flx_world = World()
import_mesh_segment(flx_world, FLX_TUBE)
flx = load_default_bolometer_config('FLX', parent=flx_world)
for detector in flx:
    print('calculating detector {}'.format(detector.detector_id))
    detector.calculate_sensitivity(grid)
flx.save("FLX_camera.pickle")

# Calculate FDC camera sensitivities
fdc_world = World()
import_mesh_segment(fdc_world, FDC_TUBE)
fdc = load_default_bolometer_config('FDC', parent=fdc_world)
for detector in fdc:
    print('calculating detector {}'.format(detector.detector_id))
    detector.calculate_sensitivity(grid)
fdc.save("FDC_camera.pickle")

# Calculate FVC camera sensitivities
コード例 #2
0
import numpy as np
import matplotlib.pyplot as plt

from cherab.tools.observers.inversion_grid import SensitivityMatrix
from cherab.aug.bolometry import load_standard_inversion_grid
from cherab.aug.bolometry import load_default_bolometer_config

EXCLUDED_CHANNELS = [
    'FVC1_A_CH1', 'FVC2_E_CH17', 'FLX_A_CH1', 'FDC_A_CH1', 'FDC_G_CH28',
    'FHS_A_CH1', 'FHC1_A_CH1', 'FHC1_A_CH2', 'FHC1_A_CH3'
]

grid = load_standard_inversion_grid()

fhc = load_default_bolometer_config('FHC', inversion_grid=grid)
flh = load_default_bolometer_config('FLH', inversion_grid=grid)
fhs = load_default_bolometer_config('FHS', inversion_grid=grid)
fvc = load_default_bolometer_config('FVC', inversion_grid=grid)
fdc = load_default_bolometer_config('FDC', inversion_grid=grid)
flx = load_default_bolometer_config('FLX', inversion_grid=grid)

num_detectors = 0
for detector in fhc:
    if detector.detector_id not in EXCLUDED_CHANNELS:
        num_detectors += 1
for detector in flh:
    if detector.detector_id not in EXCLUDED_CHANNELS:
        num_detectors += 1
for detector in fhs:
    if detector.detector_id not in EXCLUDED_CHANNELS:
        num_detectors += 1
コード例 #3
0
from raysect.core import Ray as CoreRay
from raysect.primitive import import_stl
from raysect.optical import World
from raysect.optical.material import AbsorbingSurface
from raysect.optical.material.material import NullMaterial
from raysect.core.math.sampler import TargettedHemisphereSampler

from cherab.aug.bolometry import FDC_TUBE, FLX_TUBE, FVC_TUBE, FHS_TUBE, load_default_bolometer_config
from cherab.aug.bolometry import load_standard_inversion_grid

# Load default inversion grid
grid = load_standard_inversion_grid()

world = World()
flh = load_default_bolometer_config('FLH', parent=world)
detectors = flh.foil_detectors

etendue_error_factor = {}

dtype = np.dtype([('camera', '|S3'), ('channel', np.int32),
                  ('f_Blende', np.float32), ('f_Folie', np.float32),
                  ('d_folie_blende', np.float32), ('delta', np.float32),
                  ('gamma', np.float32), ('alpha', np.float32),
                  ('faktor_f', np.float32)])
mb_etendue_array = np.loadtxt('34252.txt',
                              dtype=dtype,
                              skiprows=23,
                              usecols=(0, 1, 7, 8, 9, 10, 11, 12, 19))

flh_rows = []
コード例 #4
0
ファイル: custom_comparison.py プロジェクト: shenders/aug
import re
import numpy as np
import pickle
import matplotlib.pyplot as plt

from raysect.optical import World

from cherab.aug.bolometry import FDC_TUBE, FLX_TUBE, FVC_TUBE, FHS_TUBE, load_default_bolometer_config
from cherab.aug.bolometry import load_standard_inversion_grid

# Load default inversion grid
grid = load_standard_inversion_grid()

world = World()
fvc = load_default_bolometer_config('FVC', parent=world)
flx = load_default_bolometer_config('FLX', parent=world)
fdc = load_default_bolometer_config('FDC', parent=world)
fhs = load_default_bolometer_config('FHS', parent=world)
flh = load_default_bolometer_config('FLH', parent=world)
fhc = load_default_bolometer_config('FHC', parent=world)
detectors = fvc.foil_detectors + flx.foil_detectors + fdc.foil_detectors + fhs.foil_detectors + flh.foil_detectors + fhc.foil_detectors

etendue_error_factor = {}

dtype = np.dtype([('camera', '|S3'), ('channel', np.int32),
                  ('f_Blende', np.float32), ('f_Folie', np.float32),
                  ('d_folie_blende', np.float32), ('delta', np.float32),
                  ('gamma', np.float32), ('alpha', np.float32),
                  ('faktor_f', np.float32)])
mb_etendue_array = np.loadtxt('34252.txt',
                              dtype=dtype,
コード例 #5
0
ファイル: calculate_etendue.py プロジェクト: shenders/aug
import numpy as np

from raysect.optical import World

from cherab.aug.bolometry import FDC_TUBE, FLX_TUBE, FVC_TUBE, FHS_TUBE, load_default_bolometer_config
from cherab.aug.bolometry import load_standard_inversion_grid

# Load default inversion grid
grid = load_standard_inversion_grid()

fvc_world = World()
fvc = load_default_bolometer_config('FVC', parent=fvc_world)

fvc_ch10 = fvc['FVC1_C_CH10']
detector = fvc_ch10
detector.calculate_etendue()

mb_area_foil = 4.940000E-06  # f_foil
mb_area_pinhole = 1.811040E-05  # f_blende
mb_d = 0.07304400  # d
mb_delta = -8.400000  # delta
mb_gamma = 1.993000  # gamma
mb_alpha = -6.407000  # alpha
mb_etendue = 1.325230E-09

mb_mesh_area_reduction = mb_area_pinhole / (detector.slit.dx *
                                            detector.slit.dy)
mb_omega = mb_area_pinhole * np.cos(np.deg2rad(mb_gamma)) / mb_d**2
mb_calc_etendue = np.cos(np.deg2rad(mb_alpha)) * mb_area_foil * mb_omega

cherab_solid_angle = detector.etendue / detector._volume_observer.etendue * 2 * np.pi