csep.core.catalogs.CSEPCatalog.write_ascii

CSEPCatalog.write_ascii(filename, write_header=True, write_empty=True, append=False, id_col='id')

Write catalog in csep2 ascii format.

This format only uses the required variables from the catalog and should work by default. It can be overwritten if an event_id (or other columns should be used). By default, the routine will look for a column the catalog array called ‘id’ and will populate the event_id column with these values. If the ‘id’ column is not found, then it will leave this column blank

Short format description (comma separated values):

longitude, latitude, M, time_string format=”%Y-%m-%dT%H:%M:%S.%f”, depth, catalog_id, [event_id]

Parameters:
  • filename (str) – the file location to write the the ascii catalog file

  • write_header (bool) – Write header string (default true)

  • write_empty (bool) – Write file event if no events in catalog

  • append (bool) – If true, append to the filename

  • id_col (str) – name of event_id column (if included)

Returns:

NoneType