# Proposal for a System Model for Offline Seismic Event Detection in Colombia
## 4 Seismic Detection Model Proposal
### Reading and Interpretation of the Seismic Records  
Once the seismic records are obtained, it is necessary to understand the format in which the data are presented, to establish the mechanisms by which they will be read. After reading the data, a sample selection is proposed, which depends on the characteristics found, and a set of memory instances that represent the trace files and read parameters is obtained as an output.  
Among the most common international formats for the Sfiles [36] are HYPO71, HYPOINVERSE, and Nordic formats. The most used international formats for Waveform files are SEED, miniSEED, and SimpleASCII [37]. There are comprehensive seismological analysis tools capable of reading a wide range of formats of these two types of files, such as SEISAN and SeisComP. It is also possible to read the files through native programming languages or using libraries linked to these languages, such as SEISPP for C++ [38], Obspy for Python [39], or the open-source tools made available by the USGS for Java [40].  
The implementation of specific architectures for reading multiple seismic records is of utmost importance. It is vital to analyze the computational capacity in terms of volatile memory, mainly by considering the techniques exposed and the data stored during the seeking and gathering of seismic records. Therefore, a sub-module can be incorporated for balancing the computational load, which includes techniques for transforming volatile information into non-volatile (hard disk storage), as well as considering parallel processing mechanisms to facilitate the processing of large sets of seismic records.  
Additionally, it is pertinent to include file selection algorithms that can discard repeated files or easily identifiable irregularities in both parameter files and trace files to prevent their storage. This process is called data wrangling, in which a data-cleaning procedure is required. Among the irregularities found in the seismic records from the RSNC are inconsistencies in the format, absence of trace files that correspond to existing parameter files, lack of start and end times of the event in the records, as well as non-existent P-wave and S-wave arrival times in some of the records recorded by the seismological stations. A key process to clean the seismic data from the RSNC is shown in Figure 3.  
The data cleaning process is executed from three approaches: (1) the validation of the sought and gathered files, (2) the validation of the seismic samples in these files, and (3) the validation of the stations that register these samples.  
In the first stage of this cleaning process in the file validation approach, it is checked that the sfile and waveform files can be read correctly for processing. First, if the files cannot be read, the inconvenience may be the source of the data. Secondly, it is verified that there are no repeated files, because the complexity of processing grows and there is no compensation to the investigation for processing the same data more than once. Third, it is verified that the general sfiles data files have a correct record of the corresponding waveform file. If in any of these stages there are inconsistencies, it is recommended that the file(s) are discarded, as they may create a bias in the general seismic analysis.  
In the second stage of the cleaning process that focuses on the validation of the samples, it is convenient to check first if there is a record of the start and end time of the events that is homogeneous between each sfile and waveform files, secondly, that the P-waves have been recorded in both files.  
Finally, in the third stage of the cleaning process, changes in the seismological station sensors, their relocation, or periods in which they have stopped operating must be considered. This permits the definition of a time interval in which the analysis will be executed, with the certainty that the dynamics of the waves will not be altered by external changes that do not concern the merely seismological field.