Skip to content

If pre-processing fails all data downloaded is deleted #168

@SeismoFelix

Description

@SeismoFelix

Describe the bug/feature/issue
I am using the mass downloader feature within Pysep. Data and metadata in miniseed is saved in a temporary file. However, when some pre-processing fails:

[2025-07-21 00:51:10] - pysep - DEBUG: /Users/felix/Documents/POSTDOC/INVESTIGACION/Manuscripts/FAST_PAPER_EARTHQUAKE_SAMMAN_IRAN_2025/OUT_OF_COUNTRY_DATA/FELIX/GET_DATA_PYSEP/YAML_FILES/2025-06-20T174913_NORTHERN_AND_CENTRAL_IRAN/inv.xml
[2025-07-21 00:52:21] - pysep - INFO: cleaning up channel naming
[2025-07-21 00:54:54] - pysep - WARNING: BW.KW1..BHN can't write SAC headers: list index out of range

All data is deleted. Is there a way to keep the data already fetched, even if is not pre-processed?

To Reproduce

pysep -c 2025-06-20T174914_IRAN_remove_ir_massive_no_mtuq.yaml

See yaml file in Data section

Expected behavior
If there is a bug in the pre-processing leave the files downloaded with the metadata and not to delete everything. Also, I would like to know simply how to use pysep for download data, without pre-processing.

Versions
0.4.1

Data

event_tag: 2025-06-20T174913_IRAN
config_file: null
client: IRIS
client_debug: false
timeout: 600
taup_model: ak135
use_mass_download: true
event_selection: default
origin_time: '2025-06-20T17:49:13.0000000Z'
seconds_before_event: 120
seconds_after_event: 3600
event_latitude: 35.44
event_longitude: 53.05
event_depth_km: 10.0
event_magnitude: 5.0
networks: '*'
stations: '*'
channels: "HH?,BH?,LH?"
locations: '*'
reference_time: '2025-06-20T17:49:13.0000000Z'
seconds_before_ref: 120
seconds_after_ref: 3600
phase_list:
- ttall
mindistance_km: 0.0
maxdistance_km: 5000.0
minazimuth: 0
maxazimuth: 360
minlatitude: null
maxlatitude: null
minlongitude: null
maxlongitude: null
remove_response: false
output_unit: VEL
water_level: 0
pre_filt: default
scale_factor: 1
resample_freq: 50
remove_clipped: false
remove_insufficient_length: false
remove_masked_data: true
fill_data_gaps: 0.0
gap_fraction: 0.5
log_level: DEBUG

Thanks for any help you can provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions