pyrocko.io.ims

Read and write GSE2.0, GSE2.1, and IMS1.0 files.

Functions

dump_fh(sections, f)

Dump IMS/GSE2 sections to open file handle.

dump_string(sections)

Write IMS/GSE2 sections to string.

iload(source, **kwargs)

Load IMS/GSE2 information from given source(s)

iload_dirname(dirname, **kwargs)

Read IMS/GSE2 information from directory of IMS/GSE2 files.

iload_fh(f, **kwargs)

Load IMS/GSE2 records from open file handle.

iload_filename(filename, **kwargs)

Read IMS/GSE2 information from named file.

iload_glob(pattern, **kwargs)

Read IMS/GSE2 information from files matching a glob pattern.

iload_string(s, **kwargs)

Read IMS/GSE2 sections from bytes string.

Classes

BEA2(**kwargs)

Representation of a BEA2 line.

BeamGroup(**kwargs)

Representation of an entry in a BEAM group table.

BeamParameters(**kwargs)

Representation of an entry in a BEAM parameters table.

BeamSection(**kwargs)

Representation of a DATA_TYPE BEAM section.

BeamType(...)

Any str out of ['inc', 'coh'].

Begin(**kwargs)

Representation of a BEGIN line.

Block(**kwargs)

Base class for IMS/GSE2 data blocks / lines.

BulletinSection(**kwargs)

Representation of a DATA_TYPE BULLETIN section.

BulletinTitle(**kwargs)

Undocumented.

CAL2(**kwargs)

Representation of a CAL2 line.

CAL2Section(**kwargs)

Representation of a CAL2 + stages group in a response section.

CHK2(**kwargs)

Representation of a CHK2 line.

Channel(**kwargs)

Representation of an entry in a CHANNEL section.

ChannelSection(**kwargs)

Representation of a DATA_TYPE CHANNEL section.

DAT2(**kwargs)

Representation of a DAT2 line.

DIG2(**kwargs)

Representation of a DIG2 line.

DLY2(**kwargs)

Representation of a DLY2 line.

DLY2Section(**kwargs)

Representation of a DLY2/STA2 group.

DataType(**kwargs)

Representation of a DATA_TYPE line.

EID2(**kwargs)

Representation of an EID2 line.

ErrorLogSection(**kwargs)

Representation of a DATA_TYPE ERROR_LOG section.

EventSection(**kwargs)

Groups Event, Arrival, ...

EventTitle(**kwargs)

Undocumented.

EventsSection(**kwargs)

Representation of a DATA_TYPE EVENT section.

FAP2(**kwargs)

Representation of a FAP2 line.

FAP2Data(**kwargs)

Representation of the data tuples in FAP2 section.

FIR2(**kwargs)

Representation of a FIR2 line.

FIR2Data(**kwargs)

Representation of a line of coefficients in a FIR2 section.

FTPFile(**kwargs)

Representation of an FTP_FILE line.

FTPLogSection(**kwargs)

Representation of a DATA_TYPE FTP_LOG section.

FilterType(...)

Any str out of ['BP', 'LP', 'HP', 'BR'].

FreeFormatLine(**kwargs)

Base class for IMS/GSE2 free format lines.

GEN2(**kwargs)

Representation of a GEN2 line.

GEN2Data(**kwargs)

Representation of a data tuple in GEN2 section.

LogSection(**kwargs)

Representation of a DATA_TYPE LOG section.

MessageHeader(**kwargs)

Representation of a BEGIN/MSG_TYPE/MSG_ID/REF_ID group.

MessageType(...)

Any str out of ['REQUEST', 'DATA', 'SUBSCRIPTION'].

MsgID(**kwargs)

Representation of a MSG_ID line.

MsgType(**kwargs)

Undocumented.

Network(**kwargs)

Representation of an entry in a NETWORK section.

NetworkSection(**kwargs)

Representation of a DATA_TYPE NETWORK section.

OUT2(**kwargs)

Representation of an OUT2 line.

OUT2Section(**kwargs)

Representation of a OUT2/STA2 group.

Origin(**kwargs)

Undocumented.

OriginSection(**kwargs)

Undocumented.

Outage(**kwargs)

Representation of an entry in the OUTAGE section table.

OutageReportPeriod(**kwargs)

Representation of a the report period of an OUTAGE section.

OutageSection(**kwargs)

Representation of a DATA_TYPE OUTAGE section.

PAZ2(**kwargs)

Representation of a PAZ2 line.

PAZ2Data(**kwargs)

Representation of the complex numbers in PAZ2 sections.

RefID(**kwargs)

Representation of a REF_ID line.

ResponseSection(**kwargs)

Representation of a DATA_TYPE RESPONSE line.

STA2(**kwargs)

Representation of a STA2 line.

Section(**kwargs)

Base class for top level sections in IMS/GSE2 files.

Stage(**kwargs)

Base class for IMS/GSE2 response stages.

Station(**kwargs)

Representation of an entry in a STATION section.

StationSection(**kwargs)

Representation of a DATA_TYPE STATION section.

Stop(**kwargs)

Representation of a STOP line.

SymmetryFlag(...)

Any str out of ['A', 'B', 'C'].

TableSection(**kwargs)

Base class for table style sections.

TimeStamp(**kwargs)

Representation of a TIME_STAMP line.

Units(...)

Any str out of ['V', 'A', 'C'].

WID2(**kwargs)

Representation of a WID2 line.

WID2Section(**kwargs)

Representation of a WID2/STA2/EID2/BEA2/DAT2/CHK2 group.

WaveformSection(**kwargs)

Representation of a DATA_TYPE WAVEFORM line.

WaveformSubformat(...)

Any str out of ['INT', 'CM6', 'CM8', 'AU6', 'AU8'].

XW01(**kwargs)

Representation of a XW01 line (which is a relict from GSE1).

Exceptions

DeserializeError(*args, **kwargs)

Raised when deserialization of an IMS/GSE2 object fails.

SerializeError

Raised when serialization of an IMS/GSE2 object fails.

exception SerializeError[source]

Bases: Exception

Raised when serialization of an IMS/GSE2 object fails.

exception DeserializeError(*args, **kwargs)[source]

Bases: Exception

Raised when deserialization of an IMS/GSE2 object fails.

class Section(**kwargs)[source]

Bases: Object

Base class for top level sections in IMS/GSE2 files.

Sections as understood by this implementation typically correspond to a DATA_TYPE section in IMS/GSE2 but for some types a finer granularity has been chosen.

class Block(**kwargs)[source]

Bases: Object

Base class for IMS/GSE2 data blocks / lines.

Blocks as understood by this implementation usually correspond to individual logical lines in the IMS/GSE2 file.

class FreeFormatLine(**kwargs)[source]

Bases: Block

Base class for IMS/GSE2 free format lines.

class DataType(**kwargs)[source]

Bases: Block

Representation of a DATA_TYPE line.

type

str

subtype

str, optional

format

str

subformat

str, optional

class FTPFile(**kwargs)[source]

Bases: FreeFormatLine

Representation of an FTP_FILE line.

net_address

str

login_mode

str (pyrocko.guts.StringChoice)

directory

str

file

str

class WaveformSubformat(...) str[source]

Bases: StringChoice

Any str out of ['INT', 'CM6', 'CM8', 'AU6', 'AU8'].

Variables:
  • choices – Allowed choices (list of str).

  • ignore_case – Whether to behave case-insensitive (bool, default: False).

class WID2(**kwargs)[source]

Bases: Block

Representation of a WID2 line.

time

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

station

str

station code (5 characters)

channel

str

channel code (3 characters)

location

str, optional, default: ''

location code (aux_id, 4 characters)

sub_format

str (WaveformSubformat), default: 'CM6'

nsamples

int, default: 0

sample_rate

float, default: 1.0

calibration_factor

float, optional

system sensitivity (m/count) at reference period (calibration_period)

calibration_period

float, optional

calibration reference period [s]

instrument_type

str, optional, default: ''

instrument type (6 characters)

horizontal_angle

float, optional

horizontal orientation of sensor, clockwise from north [deg]

vertical_angle

float, optional

vertical orientation of sensor from vertical [deg]

class OUT2(**kwargs)[source]

Bases: Block

Representation of an OUT2 line.

time

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

station

str

station code (5 characters)

channel

str

channel code (3 characters)

location

str, optional, default: ''

location code (aux_id, 4 characters)

duration

float

class DLY2(**kwargs)[source]

Bases: Block

Representation of a DLY2 line.

time

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

station

str

station code (5 characters)

channel

str

channel code (3 characters)

location

str, optional, default: ''

location code (aux_id, 4 characters)

queue_duration

float

duration of queue [s]

class DAT2(**kwargs)[source]

Bases: Block

Representation of a DAT2 line.

raw_data

list of str objects, default: []

class STA2(**kwargs)[source]

Bases: Block

Representation of a STA2 line.

network

str

network code (9 characters)

lat

float, optional

lon

float, optional

coordinate_system

str, default: 'WGS-84'

elevation

float, optional

elevation [m]

depth

float, optional

emplacement depth [m]

class CHK2(**kwargs)[source]

Bases: Block

Representation of a CHK2 line.

checksum

int

class EID2(**kwargs)[source]

Bases: Block

Representation of an EID2 line.

event_id

str

event ID (8 characters)

bulletin_type

str

bulletin type (9 characters)

class BEA2(**kwargs)[source]

Bases: Block

Representation of a BEA2 line.

beam_id

str

beam ID (12 characters)

azimuth

float

slowness

float

class Network(**kwargs)[source]

Bases: Block

Representation of an entry in a NETWORK section.

network

str

network code (9 characters)

description

str

description

class Station(**kwargs)[source]

Bases: Block

Representation of an entry in a STATION section.

network

str

network code (9 characters)

station

str

station code (5 characters)

type

str

station type (4 characters) (1C: single component, 3C: three-component, hfa: high frequency array, lpa: long period array)

lat

float

lon

float

coordinate_system

str, default: 'WGS-84'

elevation

float

elevation [m]

tmin

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

tmax

pyrocko.util.get_time_float (pyrocko.guts.Timestamp), optional

class Channel(**kwargs)[source]

Bases: Block

Representation of an entry in a CHANNEL section.

network

str

network code (9 characters)

station

str

station code (5 characters)

channel

str

channel code (3 characters)

location

str, optional, default: ''

location code (aux_id, 4 characters)

lat

float, optional

lon

float, optional

coordinate_system

str, default: 'WGS-84'

elevation

float, optional

elevation [m]

depth

float, optional

emplacement depth [m]

horizontal_angle

float, optional

horizontal orientation of sensor, clockwise from north [deg]

vertical_angle

float, optional

vertical orientation of sensor from vertical [deg]

sample_rate

float

instrument_type

str, optional, default: ''

instrument type (6 characters)

tmin

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

tmax

pyrocko.util.get_time_float (pyrocko.guts.Timestamp), optional

class BeamGroup(**kwargs)[source]

Bases: Block

Representation of an entry in a BEAM group table.

beam_group

str

beam group (8 characters)

station

str

station code (5 characters)

channel

str

channel code (3 characters)

location

str, optional, default: ''

location code (aux_id, 4 characters)

weight

int, optional

weight used for this component when the beam was formed

delay

float, optional

beam delay for this component [s] (used for meabs formed by non-plane waves)

class BeamType(...) str[source]

Bases: StringChoice

Any str out of ['inc', 'coh'].

Variables:
  • choices – Allowed choices (list of str).

  • ignore_case – Whether to behave case-insensitive (bool, default: False).

class FilterType(...) str[source]

Bases: StringChoice

Any str out of ['BP', 'LP', 'HP', 'BR'].

Variables:
  • choices – Allowed choices (list of str).

  • ignore_case – Whether to behave case-insensitive (bool, default: False).

class BeamParameters(**kwargs)[source]

Bases: Block

Representation of an entry in a BEAM parameters table.

beam_id

str

beam_group

str

type

str (BeamType)

is_rotated

bool

rotation flag

azimuth

float

azimuth used to steer the beam [deg] (clockwise from North)

slowness

float

slowness used to steer the beam [s/deg]

phase

str

phase used to set the beam slowness for origin-based beams (8 characters)

filter_fmin

float

low frequency cut-off for the beam filter [Hz]

filter_fmax

float

high frequency cut-off for the beam filter [Hz]

filter_order

int

order of the beam filter

filter_is_zero_phase

bool

flag to indicate zero-phase filtering

filter_type

str (FilterType)

type of filtering

tmin

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

start date of beam use

tmax

pyrocko.util.get_time_float (pyrocko.guts.Timestamp), optional

end date of beam use

class OutageReportPeriod(**kwargs)[source]

Bases: Block

Representation of a the report period of an OUTAGE section.

tmin

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

tmax

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

class Outage(**kwargs)[source]

Bases: Block

Representation of an entry in the OUTAGE section table.

network

str

network code (9 characters)

station

str

station code (5 characters)

channel

str

channel code (3 characters)

location

str, optional, default: ''

location code (aux_id, 4 characters)

tmin

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

tmax

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

duration

float

comment

str

class CAL2(**kwargs)[source]

Bases: Block

Representation of a CAL2 line.

station

str

station code (5 characters)

channel

str

channel code (3 characters)

location

str, optional, default: ''

location code (aux_id, 4 characters)

instrument_type

str, optional, default: ''

instrument type (6 characters)

calibration_factor

float

system sensitivity (m/count) at reference period (calibration_period)

calibration_period

float

calibration reference period [s]

sample_rate

float

system output sample rate [Hz]

tmin

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

effective start date and time

tmax

pyrocko.util.get_time_float (pyrocko.guts.Timestamp), optional

effective end date and time

comments

list of str objects, default: []

class Units(...) str[source]

Bases: StringChoice

Any str out of ['V', 'A', 'C'].

Variables:
  • choices – Allowed choices (list of str).

  • ignore_case – Whether to behave case-insensitive (bool, default: False).

class Stage(**kwargs)[source]

Bases: Block

Base class for IMS/GSE2 response stages.

Available response stages are PAZ2, FAP2, GEN2, DIG2, and FIR2.

stage_number

int

stage sequence number

class PAZ2Data(**kwargs)[source]

Bases: Block

Representation of the complex numbers in PAZ2 sections.

real

float

imag

float

class PAZ2(**kwargs)[source]

Bases: Stage

Representation of a PAZ2 line.

output_units

str (Units)

output units code (V=volts, A=amps, C=counts)

scale_factor

float

scale factor [ouput units/input units]

decimation

int, optional

decimation

correction

float, optional

group correction applied [s]

npoles

int

number of poles

nzeros

int

number of zeros

description

str, optional, default: ''

description

poles

list of complex objects, default: []

zeros

list of complex objects, default: []

comments

list of str objects, default: []

class FAP2Data(**kwargs)[source]

Bases: Block

Representation of the data tuples in FAP2 section.

frequency

float

amplitude

float

phase

float

class FAP2(**kwargs)[source]

Bases: Stage

Representation of a FAP2 line.

output_units

str (Units)

output units code (V=volts, A=amps, C=counts)

decimation

int, optional

decimation

correction

float

group correction applied [s]

ntrip

int

number of frequency, amplitude, phase triplets

description

str, optional, default: ''

description

frequencies

list of float objects, default: []

frequency [Hz]

amplitudes

list of float objects, default: []

amplitude [input untits/output units]

phases

list of float objects, default: []

phase delay [degrees]

comments

list of str objects, default: []

class GEN2Data(**kwargs)[source]

Bases: Block

Representation of a data tuple in GEN2 section.

corner

float

corner frequency [Hz]

slope

float

slope above corner [dB/decate]

class GEN2(**kwargs)[source]

Bases: Stage

Representation of a GEN2 line.

output_units

str (Units)

output units code (V=volts, A=amps, C=counts)

calibration_factor

float

system sensitivity (m/count) at reference period (calibration_period)

calibration_period

float

calibration reference period [s]

decimation

int, optional

decimation

correction

float

group correction applied [s]

ncorners

int

number of corners

description

str, optional, default: ''

description

corners

list of float objects, default: []

corner frequencies [Hz]

slopes

list of float objects, default: []

slopes above corners [dB/decade]

comments

list of str objects, default: []

class DIG2(**kwargs)[source]

Bases: Stage

Representation of a DIG2 line.

sensitivity

float

sensitivity [counts/input units]

sample_rate

float

digitizer sample rate [Hz]

description

str, optional, default: ''

description

comments

list of str objects, default: []

class SymmetryFlag(...) str[source]

Bases: StringChoice

Any str out of ['A', 'B', 'C'].

Variables:
  • choices – Allowed choices (list of str).

  • ignore_case – Whether to behave case-insensitive (bool, default: False).

class FIR2Data(**kwargs)[source]

Bases: Block

Representation of a line of coefficients in a FIR2 section.

factors

list of float objects, default: []

class FIR2(**kwargs)[source]

Bases: Stage

Representation of a FIR2 line.

gain

float

filter gain (relative factor, not in dB)

decimation

int, optional

decimation

correction

float

group correction applied [s]

symmetry

str (SymmetryFlag)

symmetry flag (A=asymmetric, B=symmetric (odd), C=symmetric (even))

nfactors

int

number of factors

description

str, optional, default: ''

description

comments

list of str objects, default: []

factors

list of float objects, default: []

class Begin(**kwargs)[source]

Bases: FreeFormatLine

Representation of a BEGIN line.

version

str, optional

class MessageType(...) str[source]

Bases: StringChoice

Any str out of ['REQUEST', 'DATA', 'SUBSCRIPTION'].

Variables:
  • choices – Allowed choices (list of str).

  • ignore_case – Whether to behave case-insensitive (bool, default: False).

class MsgType(**kwargs)[source]

Bases: FreeFormatLine

Undocumented.

type

str (MessageType)

class MsgID(**kwargs)[source]

Bases: FreeFormatLine

Representation of a MSG_ID line.

msg_id_string

str

msg_id_source

str, optional

class RefID(**kwargs)[source]

Bases: FreeFormatLine

Representation of a REF_ID line.

msg_id_string

str

msg_id_source

str, optional

sequence_number

int, optional

total_number

int, optional

class LogSection(**kwargs)[source]

Bases: Section

Representation of a DATA_TYPE LOG section.

lines

list of str objects, default: []

class ErrorLogSection(**kwargs)[source]

Bases: LogSection

Representation of a DATA_TYPE ERROR_LOG section.

class FTPLogSection(**kwargs)[source]

Bases: Section

Representation of a DATA_TYPE FTP_LOG section.

ftp_file

FTPFile

class WID2Section(**kwargs)[source]

Bases: Section

Representation of a WID2/STA2/EID2/BEA2/DAT2/CHK2 group.

wid2

WID2

sta2

STA2, optional

eid2s

list of EID2 objects, default: []

bea2

BEA2, optional

dat2

DAT2

chk2

CHK2

class OUT2Section(**kwargs)[source]

Bases: Section

Representation of a OUT2/STA2 group.

out2

OUT2

sta2

STA2

class DLY2Section(**kwargs)[source]

Bases: Section

Representation of a DLY2/STA2 group.

dly2

DLY2

sta2

STA2

class WaveformSection(**kwargs)[source]

Bases: Section

Representation of a DATA_TYPE WAVEFORM line.

Any subsequent WID2/OUT2/DLY2 groups are handled as indepenent sections, so this type just serves as a dummy to read/write the DATA_TYPE WAVEFORM header.

datatype

DataType

class TableSection(**kwargs)[source]

Bases: Section

Base class for table style sections.

class NetworkSection(**kwargs)[source]

Bases: TableSection

Representation of a DATA_TYPE NETWORK section.

networks

list of Network objects, default: []

class StationSection(**kwargs)[source]

Bases: TableSection

Representation of a DATA_TYPE STATION section.

stations

list of Station objects, default: []

class ChannelSection(**kwargs)[source]

Bases: TableSection

Representation of a DATA_TYPE CHANNEL section.

channels

list of Channel objects, default: []

class BeamSection(**kwargs)[source]

Bases: Section

Representation of a DATA_TYPE BEAM section.

group

list of BeamGroup objects, default: []

parameters

list of BeamParameters objects, default: []

class CAL2Section(**kwargs)[source]

Bases: Section

Representation of a CAL2 + stages group in a response section.

cal2

CAL2

stages

list of Stage objects, default: []

class ResponseSection(**kwargs)[source]

Bases: Section

Representation of a DATA_TYPE RESPONSE line.

Any subsequent CAL2+stages groups are handled as indepenent sections, so this type just serves as a dummy to read/write the DATA_TYPE RESPONSE header.

datatype

DataType

class OutageSection(**kwargs)[source]

Bases: Section

Representation of a DATA_TYPE OUTAGE section.

report_period

OutageReportPeriod

outages

list of Outage objects, default: []

class BulletinTitle(**kwargs)[source]

Bases: Block

Undocumented.

title

str

class Origin(**kwargs)[source]

Bases: Block

Undocumented.

time

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

epicenter date and time

time_fixed

str (pyrocko.guts.StringChoice), optional

fixed flag, "f" if fixed origin time solution, None if not

time_error

float, optional

origin time error [seconds], None if fixed origin time

residual

float, optional

root mean square of time residuals [seconds]

lat

float

latitude

lon

float

longitude

lat_lon_fixed

str (pyrocko.guts.StringChoice), optional

fixed flag, "f" if fixed epicenter solution, None if not

ellipse_semi_major_axis

float, optional

semi-major axis of 90% c. i. ellipse or its estimate [m], None if fixed

ellipse_semi_minor_axis

float, optional

semi-minor axis of 90% c. i. ellipse or its estimate [m], None if fixed

ellipse_strike

float, optional

strike of 90% c. i. ellipse [0-360], None if fixed

depth

float

depth [m]

depth_fixed

str (pyrocko.guts.StringChoice), optional

fixed flag, "f" fixed depth station, “d” depth phases, None if not fixed depth

depth_error

float, optional

depth error [m], 90% c. i., None if fixed depth

nphases

int, optional

number of defining phases

nstations

int, optional

number of defining stations

azimuthal_gap

float, optional

gap in azimuth coverage [deg]

distance_min

float, optional

distance to closest station [deg]

distance_max

float, optional

distance to furthest station [deg]

analysis_type

str (pyrocko.guts.StringChoice), optional

analysis type, "a" automatic, "m" manual, "g" guess

location_method

str (pyrocko.guts.StringChoice), optional

location method, "i" inversion, "p" pattern, "g" ground truth, "o" other

event_type

str (pyrocko.guts.StringChoice), optional

event type, "de" ??, "fe" ??, "ke" known earthquake, "ki" known induced event, "km" known mine explosion, "kn" known nuclear explosion, "kr" known rockburst, "kx" known experimental explosion, "ls" landslide, "se" suspected earthquake, "si" suspected induced event, "sm" suspected mine explosion, "sn" suspected nuclear explosion, "sr" suspected rockburst, "sx" suspected experimental explosion, "uk" unknown

author

str

author of the origin

origin_id

str

origin identification

class OriginSection(**kwargs)[source]

Bases: TableSection

Undocumented.

origins

list of Origin objects, default: []

class EventTitle(**kwargs)[source]

Bases: Block

Undocumented.

event_id

str

region

str

class EventSection(**kwargs)[source]

Bases: Section

Groups Event, Arrival, …

event_title

EventTitle

origin_section

OriginSection

class EventsSection(**kwargs)[source]

Bases: Section

Representation of a DATA_TYPE EVENT section.

bulletin_title

BulletinTitle

event_sections

list of EventSection objects, default: []

class BulletinSection(**kwargs)[source]

Bases: EventsSection

Representation of a DATA_TYPE BULLETIN section.

class MessageHeader(**kwargs)[source]

Bases: Section

Representation of a BEGIN/MSG_TYPE/MSG_ID/REF_ID group.

version

str

type

str

msg_id

MsgID, optional

ref_id

RefID, optional

class TimeStamp(**kwargs)[source]

Bases: FreeFormatLine

Representation of a TIME_STAMP line.

value

pyrocko.util.get_time_float (pyrocko.guts.Timestamp)

class Stop(**kwargs)[source]

Bases: FreeFormatLine

Representation of a STOP line.

dummy

str, optional

class XW01(**kwargs)[source]

Bases: FreeFormatLine

Representation of a XW01 line (which is a relict from GSE1).

dummy

str, optional

iload_fh(f, **kwargs)[source]

Load IMS/GSE2 records from open file handle.

iload_string(s, **kwargs)[source]

Read IMS/GSE2 sections from bytes string.

iload_filename(filename, **kwargs)

Read IMS/GSE2 information from named file.

iload_dirname(dirname, **kwargs)

Read IMS/GSE2 information from directory of IMS/GSE2 files.

iload_glob(pattern, **kwargs)

Read IMS/GSE2 information from files matching a glob pattern.

iload(source, **kwargs)

Load IMS/GSE2 information from given source(s)

The source can be specified as the name of a IMS/GSE2 file, the name of a directory containing IMS/GSE2 files, a glob pattern of IMS/GSE2 files, an open filehandle or an iterator yielding any of the forementioned sources.

This function behaves as a generator yielding Section objects.

dump_fh(sections, f)[source]

Dump IMS/GSE2 sections to open file handle.

dump_string(sections)[source]

Write IMS/GSE2 sections to string.