-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trim function #2760
Comments
When you write the trimmed trace to a new SAC file, is that header correct?
|
I solved the problem. When I wrote the SAC file, the stats.sac information was not modified. I added 'st2[0].stats.sac = AttribDict({})' before writing the SAC file and it worked. |
If you have to delete the |
This is the "stats" information of the trimmed object: Stats(
{
"sampling_rate": 200.0,
"delta": 0.005,
"starttime": UTCDateTime(2008, 1, 1, 0, 0),
"endtime": UTCDateTime(2008, 1, 1, 23, 59, 59, 995000),
"npts": 17280000,
"calib": 1.0,
"network": "Y9",
"station": "ALG",
"location": "",
"channel": "HHE",
"sac": AttribDict(
{
"delta": 0.0049999999,
"depmin": -55782.0,
"depmax": 54891.0,
"scale": 1.0,
"b": 0.0,
"e": 87614.445,
"stla": -22.85915,
"stlo": -69.80658,
"stel": 1407.0,
"stdp": 0.0,
"depmen": 140.41512,
"cmpaz": 90.0,
"cmpinc": 0.0,
"nzyear": 2007,
"nzjday": 365,
"nzhour": 23,
"nzmin": 49,
"nzsec": 55,
"nzmsec": 910,
"nvhdr": 6,
"npts": 17522890,
"iftype": 1,
"iztype": 9,
"leven": 1,
"lpspol": 1,
"lovrok": 1,
"lcalda": 0,
"kstnm": "ALG",
"kcmpnm": "HHE",
"knetwk": "Y9",
}
),
"_format": "SAC",
"processing": [
"ObsPy 1.2.2: trim(endtime=UTCDateTime(2008, 1, 1, 23, 59, 59, 995000)::fill_value=None::nearest_sample=True::pad=False::starttime=UTCDateTime(2008,1, 1, 0, 0))"
],
}
) if you observe the stats.starttime is not the same that the stats.sac information. The stats.sac information is the same that the original file. If you write this SAC file and open with sac iris, the information of the file is the stats.sac. edit: formatting |
Flagging this as a bug for now until we can be sure it isn't. |
@msaezuchile When I save the trimmed To solve this you deleted the |
I have a SAC file with a length major than 1 day. When I cut the file into a 1-day length, the "stats.sac" information is the same that the original file. How I can update this information?
Thank you
Miguel
The text was updated successfully, but these errors were encountered: