Remove unnecessary data structure complexity #38
Labels
No Label
analysis
bug
documentation
enhancement
feature
incompatibility
management
Priority:0
Priority:1
Priority:2
Priority:3
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: marcel/pylot#38
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Data structures related to the structure of folders when PyLoT was written. Migration of data structures and handling of manifold structures has become a lot easier lately. Thus, the formerly used classes can be removed or simplified.
Acceptance Criteria:
Data structures are only used for special cases. Unused sub-classes are removed.
related Pull-Request:
#39
@marcel FYI
Design proposal:
For actual implementation I would need a test data set. Alternatively, @marcel takes the implementation on this branch for testing purposes. Are there other data structures in use?
This is the first proposal for a change:
Explanation
SeismicEventData Class:
find_event_files(directory, extensions)
:directory
(str): The directory path to search for event files.extensions
(List[str]): List of file extensions to search for.read_event_from_directory(directory, extensions, format)
:find_event_files
to get the list of event files and reads the first one found, using the specified format.directory
(str): The directory path to search for event files.extensions
(List[str]): List of file extensions to search for.format
(str): The format to read the event file.read_event(file_path, format)
:file_path
(str): The path to the event file.format
(str): The format to read the event file.write_event(file_path, format)
:file_path
(str): The path to the output file.format
(str): The format to write the event file.WaveformData Class:
find_waveform_files(directory, extensions)
:directory
(str): The directory path to search for waveform files.extensions
(List[str]): List of file extensions to search for.read_waveform_from_directory(directory, extensions, format)
:find_waveform_files
to get the list of waveform files and reads the first one found, using the specified format.directory
(str): The directory path to search for waveform files.extensions
(List[str]): List of file extensions to search for.There is no difference between
ObspyDMTdataStructure
andPilotDataStructure
. Why are both implemented?HASH format is now missing in
writephases
needs to be re-implemented.I just saw that
obspy.io
nowadays supports many of the file formats which are used by PyLoT. Instead of using untested self-written code, PyLoT should exploit the capabilities ofobspy
.Removed unnecessary code. Trying to get an overview of the data handling to be able to further simplify. These changes might break PyLoT in the first place but fixing makes it better than before.
Done with cb457fc7ec