1111from artist .core .heliostat_ray_tracer import HeliostatRayTracer
1212from artist .core .kinematics_reconstructor import KinematicsReconstructor
1313from artist .core .loss_functions import FocalSpotLoss
14- from artist .data_parser import paint_scenario_parser
1514from artist .data_parser .calibration_data_parser import CalibrationDataParser
1615from artist .data_parser .paint_calibration_parser import PaintCalibrationDataParser
1716from artist .field .heliostat_group import HeliostatGroup
@@ -182,47 +181,47 @@ def create_plots(
182181device = get_device ()
183182
184183# Specify the path to your scenario.h5 file.
185- scenario_path = pathlib .Path ("/workVERLEIHNIX/mb/ARTIST/tutorials/data/scenarios/test_scenario_paint_multiple_heliostat_groups_deflectometry .h5" )
184+ scenario_path = pathlib .Path ("please/insert/the/path/to/the/scenario/here/scenario .h5" )
186185
187186# Also specify the heliostats to be calibrated and the paths to your calibration-properties.json files.
188187# Please use the following style: list[tuple[str, list[pathlib.Path], list[pathlib.Path]]]
189- # heliostat_data_mapping = [
190- # (
191- # "heliostat_name_1",
192- # [
193- # pathlib.Path(
194- # "please/insert/the/path/to/the/paint/data/here/calibration-properties.json"
195- # ),
196- # # ....
197- # ],
198- # [
199- # pathlib.Path("please/insert/the/path/to/the/paint/data/here/flux.png"),
200- # # ....
201- # ],
202- # ),
203- # (
204- # "heliostat_name_2",
205- # [
206- # pathlib.Path(
207- # "please/insert/the/path/to/the/paint/data/here/calibration-properties.json"
208- # ),
209- # # ....
210- # ],
211- # [
212- # pathlib.Path("please/insert/the/path/to/the/paint/data/here/flux.png"),
213- # # ....
214- # ],
215- # ),
216- # ]
188+ heliostat_data_mapping = [
189+ (
190+ "heliostat_name_1" ,
191+ [
192+ pathlib .Path (
193+ "please/insert/the/path/to/the/paint/data/here/calibration-properties.json"
194+ ),
195+ # ....
196+ ],
197+ [
198+ pathlib .Path ("please/insert/the/path/to/the/paint/data/here/flux.png" ),
199+ # ....
200+ ],
201+ ),
202+ (
203+ "heliostat_name_2" ,
204+ [
205+ pathlib .Path (
206+ "please/insert/the/path/to/the/paint/data/here/calibration-properties.json"
207+ ),
208+ # ....
209+ ],
210+ [
211+ pathlib .Path ("please/insert/the/path/to/the/paint/data/here/flux.png" ),
212+ # ....
213+ ],
214+ ),
215+ ]
217216
218217# Or if you have a directory with downloaded data use this code to create a mapping.
219- heliostat_data_mapping = paint_scenario_parser .build_heliostat_data_mapping (
220- base_path = "/workVERLEIHNIX/share/PAINT_data " ,
221- heliostat_names = ["AA39 " , "AA31 " ],
222- number_of_measurements = 2 ,
223- image_variant = "flux" ,
224- randomize = True ,
225- )
218+ # heliostat_data_mapping = paint_scenario_parser.build_heliostat_data_mapping(
219+ # base_path="base/path/data ",
220+ # heliostat_names=["heliostat_1 ", "... "],
221+ # number_of_measurements=5 ,
222+ # image_variant="flux",
223+ # randomize=True,
224+ # )
226225
227226# Configure the optimization.
228227optimizer_dict = {
@@ -295,15 +294,15 @@ def create_plots(
295294 scenario_file = scenario_file , device = device
296295 )
297296
298- resolution = torch .tensor ([300 , 360 ], device = device )
297+ resolution = torch .tensor ([256 , 256 ], device = device )
299298
300299 bitmaps_before , _ = create_fluxes (
301300 data_parser = data_parser_plots ,
302301 heliostat_data_mapping = [
303302 (heliostat [0 ], [heliostat [1 ][- 1 ]], [heliostat [2 ][- 1 ]])
304303 for heliostat in heliostat_data_mapping
305304 ],
306- resolution = resolution
305+ resolution = resolution ,
307306 )
308307
309308 loss_definition = FocalSpotLoss (scenario = scenario )
@@ -316,7 +315,7 @@ def create_plots(
316315 dni = 500 ,
317316 optimization_configuration = optimization_configuration ,
318317 reconstruction_method = config_dictionary .kinematics_reconstruction_raytracing ,
319- bitmap_resolution = resolution
318+ bitmap_resolution = resolution ,
320319 )
321320
322321 # Reconstruct the kinematics.
@@ -333,7 +332,7 @@ def create_plots(
333332 (heliostat [0 ], [heliostat [1 ][- 1 ]], [heliostat [2 ][- 1 ]])
334333 for heliostat in heliostat_data_mapping
335334 ],
336- resolution = resolution
335+ resolution = resolution ,
337336)
338337create_plots (
339338 fluxes_before = bitmaps_before ,
0 commit comments