DumpInstrumentTool#
- class ctapipe.tools.dump_instrument.DumpInstrumentTool(*args: t.Any, **kwargs: t.Any)[source]#
Bases:
ToolAttributes Summary
A trait for unicode strings.
Format of output file.
Output directory.
Methods Summary
finish()Finish up.
setup()Set up the tool.
start()Main function of the tool.
writes out camgeom and camreadout files for each camera
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.
Attributes Documentation
- aliases: StrDict = {('f', 'format'): 'DumpInstrumentTool.format', ('i', 'input'): 'EventSource.input_url', ('o', 'outdir'): 'DumpInstrumentTool.outdir'}#
- classes: ClassesType = [<class 'ctapipe.io.eventsource.EventSource'>]#
- format#
Format of output file. ‘service’ creates CTAO service data format directory structure.
- outdir#
Output directory. If not given, the current working directory will be used.
Methods Documentation
- 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
initializewhenrunis called.
- 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