DumpInstrumentTool#

class ctapipe.tools.dump_instrument.DumpInstrumentTool(*args: t.Any, **kwargs: t.Any)[source]#

Bases: Tool

Attributes Summary

aliases

classes

description

A trait for unicode strings.

format

Format of output file.

name

outdir

Output directory.

Methods Summary

finish()

Finish up.

setup()

Set up the tool.

start()

Main function of the tool.

write_camera_definitions()

writes out camgeom and camreadout files for each camera

write_optics_descriptions()

writes out optics files for each telescope type

write_service_data([subarray_id, site])

Write SubarrayDescription to service data directory structure.

write_single_camera(camera[, outdir, ...])

Write out camera geometry and readout for a single camera.

write_subarray_description()

Attributes Documentation

aliases: StrDict = {('f', 'format'): 'DumpInstrumentTool.format', ('i', 'input'): 'EventSource.input_url', ('o', 'outdir'): 'DumpInstrumentTool.outdir'}#
classes: ClassesType = [<class 'ctapipe.io.eventsource.EventSource'>]#
description: str | Unicode[str, str | bytes]#

A trait for unicode strings.

format#

Format of output file. ‘service’ creates CTAO service data format directory structure.

name: str | Unicode[str, str | bytes] = 'ctapipe-dump-instrument'#
outdir#

Output directory. If not given, the current working directory will be used.

Methods Documentation

finish()[source]#

Finish up.

This is called automatically after start when run is called.

setup()[source]#

Set up the tool.

This method runs after the configuration and command line options have been parsed.

Here the tool should construct all Components, open files, etc.

start()[source]#

Main function of the tool.

This is automatically called after initialize when run is called.

write_camera_definitions()[source]#

writes out camgeom and camreadout files for each camera

write_optics_descriptions()[source]#

writes out optics files for each telescope type

write_service_data(subarray_id=1, site=None)[source]#

Write SubarrayDescription to service data directory structure.

This creates the directory structure and files, which can later be loaded with from_service_data.

Parameters:
subarray_idint, optional

Subarray ID to assign (default: 1)

sitestr, optional

Site name (e.g., “CTAO-North”, “CTAO-South”). If not provided, it will be inferred from the reference location.

write_single_camera(camera, outdir=None, name_prefix=None)[source]#

Write out camera geometry and readout for a single camera.

Parameters:
cameraCameraDescription

CameraDescription object to write out

outdirPath, optional

Directory to write files to. If None, uses self.outdir

name_prefixstr, optional

Prefix for output filenames. If None, uses camera.name

write_subarray_description()[source]#