cphd debug utility (sarpy.utils.cphd_utils)¶
Extract information from the CPHD header for review.
From the command-line
>>> python -m sarpy.utils.cphd_utils <path to cphd file>
For a basic help on the command-line, check
>>> python -m sarpy.utils.cphd_utils --help
- sarpy.utils.cphd_utils.print_cphd_metadata(input_file, destination=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)¶
Prints the full CPHD metadata (both header and CPHD structure) to the given destination.
- Parameters:
input_file (str|BinaryIO) –
destination (TextIO) –
- sarpy.utils.cphd_utils.print_cphd_header(input_file, destination=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)¶
Prints the full CPHD header to the given destination.
- Parameters:
input_file (str|BinaryIO) –
destination (TextIO) –
- sarpy.utils.cphd_utils.print_cphd_xml(input_file, destination=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)¶
Prints the full CPHD header to the given destination.
- Parameters:
input_file (str|BinaryIO) –
destination (TextIO) –
- sarpy.utils.cphd_utils.dump_cphd_metadata(input_file, destination)¶
Dump the CPHD metadata (both header and CPHD structure) to the given destination.
- Parameters:
input_file (str|BinaryIO) – Path to or binary file-like object containing a CPHD file.
destination (str) – ‘stdout’, ‘string’, ‘default’ (will use file_name+’.meta_dump.txt’), or the path to an output file.
- Returns:
There is only a return value if destination==’string’.
- Return type:
None|str
- sarpy.utils.cphd_utils.dump_cphd_header(input_file, destination)¶
Dump the CPHD header to the given destination.
- Parameters:
input_file (str|BinaryIO) – Path to or binary file-like object containing a CPHD file.
destination (str) – ‘stdout’, ‘string’, ‘default’ (will use file_name+’.meta_dump.txt’), or the path to an output file.
- Returns:
There is only a return value if destination==’string’.
- Return type:
None|str
- sarpy.utils.cphd_utils.dump_cphd_xml(input_file, destination)¶
Dump the CPHD structure to the given destination.
- Parameters:
input_file (str|BinaryIO) – Path to or binary file-like object containing a CPHD file.
destination (str) – ‘stdout’, ‘string’, ‘default’ (will use file_name+’.meta_dump.txt’), or the path to an output file.
- Returns:
There is only a return value if destination==’string’.
- Return type:
None|str