Skip to content

Commit efa88e5

Browse files
committed
feat: Allow exporting MiniSEED clips with STEIM2 compression
1 parent 02dd65b commit efa88e5

5 files changed

Lines changed: 56 additions & 23 deletions

File tree

CHANGELOG.md

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
Starting from v2.2.5, all notable changes to this project will be documented in this file.
44

5+
## v4.0.2
6+
7+
### Release Notes
8+
9+
This patch release focuses on reliability improvements and critical bug fixes. It introduces STEIM2 compression support for MiniSEED export and resolves issues affecting helicorder rendering and token expiration.
10+
11+
🧠 **What’s New**
12+
13+
Enhancements in this version contribute to better performance, interoperability, and system integrity, especially when exporting seismic clips and managing real-time data views.
14+
15+
### New Features
16+
17+
- Added support for exporting **MiniSEED clips with STEIM2 compression**, fixing Waves' compatibility issue on INT32 encoding.
18+
19+
### Bug Fixes
20+
21+
- Fixed a **division by zero** error in the helicorder generator under certain data conditions.
22+
- Corrected an issue where **temporary tokens never expired**, improving session security and compliance.
23+
524
## v4.0.1
625

726
### Release Notes
@@ -12,39 +31,32 @@ A minor but essential update focusing on stability, performance, and new regiona
1231

1332
This version includes critical bug fixes, UI improvements, and a new data integration, further enhancing the reliability and usability of the AnyShake Observer platform.
1433

15-
### Bug Fixes
34+
### New Features
1635

17-
* Fixed a link error with **Go 1.24.3** that could cause build failures on Darwin.
18-
* Prevented unnecessary **message bus re-creation**, improving runtime stability.
19-
* Corrected **translation keys** for more accurate localization.
36+
- Added **Thai Meteorological Department** as a new data agency, expanding regional data support.
37+
- Enhanced UI to **highlight unsaved changes**, reducing the risk of accidental data loss.
38+
- Optimized **error handling** for more robust system behavior.
2039

21-
### New Features
40+
### Bug Fixes
2241

23-
* Added **Thai Meteorological Department** as a new data agency, expanding regional data support.
24-
* Enhanced UI to **highlight unsaved changes**, reducing the risk of accidental data loss.
25-
* Optimized **error handling** for more robust system behavior.
42+
- Fixed a link error with **Go 1.24.3** that could cause build failures on Darwin.
43+
- Prevented unnecessary **message bus re-creation**, improving runtime stability.
44+
- Corrected **translation keys** for more accurate localization.
2645

2746
## v4.0.0
2847

2948
### Release Notes
3049

3150
We are proud to announce **AnyShake Observer v4.0.0**, a major release that marks a transformative step forward in our seismic monitoring software. This update is **incompatible with all previous versions** due to significant architectural changes and feature enhancements.
3251

33-
🚀 **Now crowdfunding on CrowdSupply**
52+
🚀 **Now crowdfunding on CrowdSupply**
3453

3554
Alongside this release, we are launching the **AnyShake Explorer**, a fully open-source, low-cost, and reliable seismic data acquisition device. Designed for researchers, hobbyists, and professionals alike, the Explorer integrates seamlessly with AnyShake Observer and sets a new standard for affordable and powerful seismology tools.
3655

37-
🧠 **What’s New**
56+
🧠 **What’s New**
3857

3958
This version represents a leap forward in terms of **usability, security, reliability, and functionality** — setting a new benchmark in open-source seismic software.
4059

41-
### Bug Fixes
42-
43-
- Resolved high CPU usage issue caused by "empty-run" behavior after Explorer device disconnection.
44-
- Fixed significant time offset when AnyShake Observer starts before Explorer under NTP mode.
45-
- Resolved decoder thread crash when receiving delayed data via serial-to-TCP device.
46-
- Fixed numerous potential data race issues for improved multithreaded stability.
47-
4860
### New Features
4961

5062
- Simplified deployment with just **40 lines of configuration** to get started.
@@ -65,6 +77,13 @@ This version represents a leap forward in terms of **usability, security, reliab
6577
- Improved **SeedLink protocol** stability.
6678
- Added **multi-language support** with translations in 9 languages.
6779

80+
### Bug Fixes
81+
82+
- Resolved high CPU usage issue caused by "empty-run" behavior after Explorer device disconnection.
83+
- Fixed significant time offset when AnyShake Observer starts before Explorer under NTP mode.
84+
- Resolved decoder thread crash when receiving delayed data via serial-to-TCP device.
85+
- Fixed numerous potential data race issues for improved multithreaded stability.
86+
6887
---
6988

7089
## v3.6.1
@@ -631,4 +650,4 @@ This version represents a leap forward in terms of **usability, security, reliab
631650
- Use templates to standardize ISSUEs and Pull Requests
632651
- Update repository frontend logos
633652

634-
---
653+
---

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v4.0.1
1+
v4.0.2

internal/server/router/export/mseed.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ import (
1313
)
1414

1515
type seismicDataEncoderMseedImpl struct {
16+
name string
17+
encodeType int
18+
1619
actionHandler *action.Handler
1720
stationCodeConfig config.StationStationCodeConfigConstraintImpl
1821
locationCodeConfig config.StationLocationCodeConfigConstraintImpl
1922
networkCodeConfig config.StationNetworkCodeConfigConstraintImpl
2023
}
2124

2225
func (e *seismicDataEncoderMseedImpl) GetName() string {
23-
return "MiniSEED"
26+
return e.name
2427
}
2528

2629
func (e *seismicDataEncoderMseedImpl) Encode(records []model.SeisRecord, channelCode string) ([]byte, error) {
@@ -42,7 +45,7 @@ func (e *seismicDataEncoderMseedImpl) Encode(records []model.SeisRecord, channel
4245
networkCodeStr := networkCode.(string)
4346

4447
var miniseed mseedio.MiniSeedData
45-
err = miniseed.Init(mseedio.INT32, mseedio.MSBFIRST)
48+
err = miniseed.Init(e.encodeType, mseedio.MSBFIRST)
4649
if err != nil {
4750
return nil, err
4851
}

internal/server/router/export/setup.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/anyshake/observer/internal/dao/action"
1010
"github.com/anyshake/observer/internal/hardware"
1111
"github.com/anyshake/observer/internal/server/response"
12+
"github.com/bclswl0827/mseedio"
1213
"github.com/gin-gonic/gin"
1314
"github.com/samber/lo"
1415
)
@@ -26,7 +27,17 @@ func Setup(routerGroup *gin.RouterGroup, actionHandler *action.Handler, hardware
2627
locationCodeConfig: locationCodeConfig,
2728
networkCodeConfig: networkCodeConfig,
2829
},
29-
"mseed": &seismicDataEncoderMseedImpl{
30+
"mseed_int32": &seismicDataEncoderMseedImpl{
31+
encodeType: mseedio.INT32,
32+
name: "MiniSEED (INT32)",
33+
actionHandler: actionHandler,
34+
stationCodeConfig: stationCodeConfig,
35+
locationCodeConfig: locationCodeConfig,
36+
networkCodeConfig: networkCodeConfig,
37+
},
38+
"mseed_steim2": &seismicDataEncoderMseedImpl{
39+
encodeType: mseedio.STEIM2,
40+
name: "MiniSEED (STEIM2)",
3041
actionHandler: actionHandler,
3142
stationCodeConfig: stationCodeConfig,
3243
locationCodeConfig: locationCodeConfig,

internal/server/router/export/wav.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (e *seismicDataEncoderWavImpl) Encode(records []model.SeisRecord, channelCo
6969
}
7070

7171
originalSampleRate := int(float64(len(audioData)) / (timeDiff / 30.0))
72-
filterKernel := e.getLowPassFilter(originalSampleRate, 25, 51)
72+
filterKernel := e.getLowPassFilter(originalSampleRate, 25, 311)
7373
audioData = e.applyFilter(audioData, filterKernel)
7474

7575
interpolatedData := e.linearInterpolate(audioData, originalSampleRate, e.outputSampleRate)

0 commit comments

Comments
 (0)