Difference between revisions of "CSEP 2 CATALOG FORMAT"

From SCECpedia
Jump to navigationJump to search
 
(7 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
The catalog will be defined as a (ASCII/utf-8) text-file in csv format. Each row corresponds to a single event. This file will have the following headers:<br><br>
 
The catalog will be defined as a (ASCII/utf-8) text-file in csv format. Each row corresponds to a single event. This file will have the following headers:<br><br>
 
<code>
 
<code>
longitude, latitude, '''M''', time_string format="%Y-%m-%dT%H:%M:%S.%f", depth, [catalog_id]
+
longitude, latitude, '''M''', time_string format="%Y-%m-%dT%H:%M:%S.%f", depth, catalog_id, [event_id]
 
</code>
 
</code>
  
Line 15: Line 15:
 
<code>'''depth'''</code>: hypocenter depth in (km)</br>
 
<code>'''depth'''</code>: hypocenter depth in (km)</br>
 
<code>'''catalog_id'''</code>: indicates type of catalog</br>
 
<code>'''catalog_id'''</code>: indicates type of catalog</br>
 +
<code>'''event_id'''</code> [optional] column to indicate specific flags for a given event
 
* observed: -1
 
* observed: -1
 
* simulated: [0, n_cat-1]
 
* simulated: [0, n_cat-1]
Line 23: Line 24:
 
[[Media:Csep2_sample_catalog-comcat.csv|Downloadable Example]]
 
[[Media:Csep2_sample_catalog-comcat.csv|Downloadable Example]]
  
The catalog at the above link contains 1552 events. This catalog requires 92kb of storage. The table below shows  
+
The catalog at the above link contains 829 events. This catalog requires 52kb of storage. The table below shows expected sizes of these catalogs for individual catalogs (middle) and forecast (right) assuming 100000 catalogs per forecast. Important: If event_id is not provided by the modeler there needs to be a ',' in the final column. See example below.
  
 
{| class = 'wikitable'
 
{| class = 'wikitable'
Line 56: Line 57:
 
|}
 
|}
 
<code>
 
<code>
lon,lat,M,epoch_time,depth,catalog_id,event_id
+
lon,lat,M,time_string,depth,catalog_id,event_id
 
</code><br>
 
</code><br>
-117.43017,35.616665,4.73,2019-07-06 03:22:35.630000,9.35,-1<br>
+
-117.43017,35.616665,4.73,2019-07-06T03:22:35.630000,9.35,-1,<br>
-117.7365,35.891,4.64,2019-07-06 03:22:48.300000,9.1,-1<br>
+
-117.7365,35.891,4.64,2019-07-06T03:22:48.300000,9.1,-1,<br>
-117.617836,35.803165,4.84,2019-07-06 03:23:50.720000,11.44,-1<br>
+
-117.617836,35.803165,4.84,2019-07-06T03:23:50.720000,11.44,-1,<br>
-117.67083,35.86067,4.61,2019-07-06 03:25:27.970000,10.32,-1<br>
+
-117.67083,35.86067,4.61,2019-07-06T03:25:27.970000,10.32,-1,<br>
-117.72583,35.913834,4.5,2019-07-06 03:27:07.010000,8.0,-1<br>
+
-117.72583,35.913834,4.5,2019-07-06T03:27:07.010000,8.0,-1,<br>
-117.431335,35.530334,4.57,2019-07-06 03:27:11.370000,3.83,-1<br>
+
-117.431335,35.530334,4.57,2019-07-06T03:27:11.370000,3.83,-1,<br>
-117.7115,35.902832,4.51,2019-07-06 03:29:32.080000,3.18,-1<br>
+
-117.7115,35.902832,4.51,2019-07-06T03:29:32.080000,3.18,-1,<br>
-117.35817,35.556667,4.49,2019-07-06 03:30:25.050000,8.71,-1<br>
+
-117.35817,35.556667,4.49,2019-07-06T03:30:25.050000,8.71,-1,<br>
-117.73033,35.890335,4.17,2019-07-06 03:32:46.660000,6.15,-1<br>
+
-117.73033,35.890335,4.17,2019-07-06T03:32:46.660000,6.15,-1,<br>
-117.505165,35.714832,4.13,2019-07-06 03:33:09.850000,1.74,-1<br>
+
-117.505165,35.714832,4.13,2019-07-06T03:33:09.850000,1.74,-1,<br>
-117.466835,35.65217,4.09,2019-07-06 03:35:05.420000,1.97,-1<br>
+
-117.466835,35.65217,4.09,2019-07-06T03:35:05.420000,1.97,-1,<br>
-117.73383,35.902832,4.35,2019-07-06 03:36:16.460000,7.27,-1<br>
+
-117.73383,35.902832,4.35,2019-07-06T03:36:16.460000,7.27,-1,<br>

Latest revision as of 23:35, 11 June 2020

Summary

The general philosophy is the file format should be human readable and easy to use for both researchers and developers. (The actual storage of these catalogs in CSEP testing centers might be different than this proposed format).

The catalog will be defined as a (ASCII/utf-8) text-file in csv format. Each row corresponds to a single event. This file will have the following headers:

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

longitude: longitude in decimal degrees
latitude: latitude in decimal degrees
M: magnitude
time string (UTC): year-month-day hour-minute-second.fraction_second. strptime format="%Y-%m-%dT%H:%M:%S.%f": example: 1985-01-01T00:00:00.0
depth: hypocenter depth in (km)
catalog_id: indicates type of catalog
event_id [optional] column to indicate specific flags for a given event

  • observed: -1
  • simulated: [0, n_cat-1]

This format can be easily extended to additional file types, including more advanced storage including binary, HDF5, or database representations. Modelers can chose an arbitrary number of catalogs to store within a file. Events will be mapped to catalogs through the catalog_id field, which would prevent the build-up of many, but potentially empty, catalog files.

Example Catalog

Downloadable Example

The catalog at the above link contains 829 events. This catalog requires 52kb of storage. The table below shows expected sizes of these catalogs for individual catalogs (middle) and forecast (right) assuming 100000 catalogs per forecast. Important: If event_id is not provided by the modeler there needs to be a ',' in the final column. See example below.

event count catalog size (Mb) forecast size (Gb)
1 0.00006 0.00568
10 0.00058 0.05681
100 0.00582 0.56811
500 0.02909 2.84053
1000 0.05817 5.68107
5000 0.29087 28.40534

lon,lat,M,time_string,depth,catalog_id,event_id
-117.43017,35.616665,4.73,2019-07-06T03:22:35.630000,9.35,-1,
-117.7365,35.891,4.64,2019-07-06T03:22:48.300000,9.1,-1,
-117.617836,35.803165,4.84,2019-07-06T03:23:50.720000,11.44,-1,
-117.67083,35.86067,4.61,2019-07-06T03:25:27.970000,10.32,-1,
-117.72583,35.913834,4.5,2019-07-06T03:27:07.010000,8.0,-1,
-117.431335,35.530334,4.57,2019-07-06T03:27:11.370000,3.83,-1,
-117.7115,35.902832,4.51,2019-07-06T03:29:32.080000,3.18,-1,
-117.35817,35.556667,4.49,2019-07-06T03:30:25.050000,8.71,-1,
-117.73033,35.890335,4.17,2019-07-06T03:32:46.660000,6.15,-1,
-117.505165,35.714832,4.13,2019-07-06T03:33:09.850000,1.74,-1,
-117.466835,35.65217,4.09,2019-07-06T03:35:05.420000,1.97,-1,
-117.73383,35.902832,4.35,2019-07-06T03:36:16.460000,7.27,-1,