Compute Reference Stack
Reference Stack computation for MSNoise 2.x configsets workflow.
This step computes (or validates) the REF stack for a refstack configset.
Refstack is a sibling of stack — both are children of the filter
pass-through node. It is a prerequisite for mwcs / stretching /
wavelet, which are only created once both a Done refstack REF sentinel
and Done stack days exist for the pair.
Two modes are supported, determined by ref_begin in the refstack configset:
- Mode A — Fixed REF (
ref_beginis a date or"1970-01-01") Reads daily CCFs from the filter-level output folder, stacks the windows falling within
[ref_begin, ref_end], and writes a single REF NetCDF file under therefstack_Mstep folder:OUTPUT/.../filter_N/refstack_M/_output/REF/<components>/sta1_sta2.nc
- Mode B — Rolling REF (
ref_beginis a negative integer string, e.g."-5") No file is written. The job validates that MOV data exists for the pair and marks itself Done immediately. The actual rolling reference is computed on-the-fly inside the mwcs / stretching / wavelet workers via
compute_rolling_ref().
Configuration parameters (from the refstack configset):
ref_beginref_endstack_methodpws_timegate/pws_power(Mode A + pws only)
To run this step:
$ msnoise cc stack_refstack
This step also supports parallel processing:
$ msnoise -t 4 cc stack_refstack
Configuration Parameters
refstack.ref_begin: Start of REF period. Absolute date (YYYY-MM-DD) OR negative integer for rolling-index mode (e.g. -5 means 5 windows before current) (default=1970-01-01)refstack.ref_end: End of REF period. Absolute date (YYYY-MM-DD) OR negative integer (e.g. -1 means exclude self). Must be > ref_begin when both are negative. (default=2100-01-01)refstack.stack_method: Stack method for REF computation (Mode A only) (default=linear)refstack.pws_timegate: If stack_method=pws: smoothing width in seconds (Mode A only) (default=10.0)refstack.pws_power: If stack_method=pws: power of the weighting (Mode A only) (default=2.0)refstack.wienerfilt: Apply Wiener filter to daily CCFs before REF stacking (Mode A only). Y/N (default=N)refstack.wiener_mlen: Wiener smoothing along date axis (time delta, e.g. 24h) (default=24h)refstack.wiener_nlen: Wiener smoothing along lag-time axis (time delta, e.g. 0.5s) (default=0.5s)cc.keep_all: Keep all cross-corr (length:corr_duration) (default=Y)cc.corr_duration: Data windows to correlate (in seconds) (default=1800.0)cc.cc_sampling_rate: Sampling Rate for the CrossCorrelation (in Hz) (default=20.0)cc.components_to_compute: List (comma separated) of components to compute between two different stations (default=ZZ)cc.components_to_compute_single_station: List (comma separated) of components within a single station. ZZ would be the autocorrelation of Z component, while ZE or ZN are the cross-components. Defaults to [], no single-station computations are done. (default=)global.hpc: Is MSNoise going to run on an HPC? (default=N)
- msnoise.s04_stack_refstack.main(loglevel='INFO')
Compute REF stacks for all pending
refstackjobs.
See also
Reading these results in Python — use MSNoiseResult:
from msnoise.results import MSNoiseResult
from msnoise.core.db import connect
db = connect()
r = MSNoiseResult.from_ids(db, ...) # include the steps you need
# then call r.get_ref(...)
See Reading outputs with MSNoiseResult for the full guide and all available methods.