import { DateTime, Duration } from "luxon"; import * as miniseed from "./miniseed.mjs"; import { SeismogramDisplayData } from "./seismogram.mjs"; import { Channel } from "./stationxml.mjs"; export declare const Allowed_Flags: string[]; /** * A web based connection to an archive of miniseed files * arranged based on a pattern using n, s, l, c, Y, j, H * for network, station, locid, channel, year, day of year * and hour. This is a subset of the options available within * the IRIS Ringserver MSeedArchive option, on which this * is based. Retrieved seismograms are cut from the larger * miniseed files retrieved via http(s), and so there is * wasted bandwidth to the server. On the other hand this * requires no extra software on the server side beyond * a directory structure with suitably small miniseed files. * Generally we find channel-hour is a reasonable size for * most seismic channels. The URL to needed files is * constructed by concatenating the rootUrl with the pattern * using a time range large enough to get all overlaps * based on the smallest sample rate per channel band code * and record size, which defaults to 512. * */ export declare class MSeedArchive { _rootUrl: string; _pattern: string; _recordSize: number; _timeoutSec: number; constructor(rootUrl: string, pattern: string); get rootUrl(): string; get pattern(): string; get recordSize(): number; /** * checks pattern for allowed flags as not all that are supported * by ringserver are supported here. Must only include: * * n network code, white space removed * * s station code, white space removed * * l location code, white space removed * * c channel code, white space removed * * Y year, 4 digits * * j day of year, 3 digits zero padded * * H hour, 2 digits zero padded * * @param p mseed archive pattern string * @returns true if all flags are allowed */ checkPattern(p: string): boolean; /** * Loads seismograms from the remote miniseed archive via * http(s). Files downloaded include all that might overlap * the given time window based on record size, * the minimum sample rate * for the channel band code and the given time window. * * @param channelTimeList request channels and time windows * @returns Promise to the same SeismogramDisplayData array, but with seismograms populated */ loadSeismograms(channelTimeList: Array): Promise>; /** * Loads miniseed records based on channel and time window. * * @param channel channel to request * @param startTime start time * @param endTime end time * @returns Promise to array of miniseed records */ loadDataForChannel(channel: Channel, startTime: DateTime, endTime: DateTime): Promise>; /** * Loads miniseed records based on string channel codes. * * @param net network code * @param sta station code * @param loc location code * @param chan channel code * @param startTime start time * @param endTime end time * @param sampleRate known sample rate for this channel * @returns Promise to array of miniseed records */ loadData(net: string, sta: string, loc: string, chan: string, startTime: DateTime, endTime: DateTime, sampleRate?: number): Promise>; /** * Replaces codes from channel in base pattern. * * @param net string to replace '%n' * @param sta string to replace '%s' * @param loc string to replace '%l' * @param chan string to replace '%c' * @returns new string with channel replacements made */ fillBasePattern(net: string, sta: string, loc: string, chan: string): string; /** * Replaces time entries ( %Y, %j, %H ) in pattern. * * @param basePattern pattern to replace in * @param t DateTime in time * @returns string with time replaces */ fillTimePattern(basePattern: string, t: DateTime): string; } export declare function loadDataRecords(urlList: Array, fetchInit?: RequestInit, timeoutSec?: number): Promise>; /** * Gives the maximum sample rate for the channel, based on the * band code, first char, of the channel code. * * @param chan channel code like BHZ, only the first letter is used * @returns mimumum sample rate this could be */ export declare function maxSampleRate(chan: string): number; /** * Gives the minimum sample rate for the channel, based on the * band code, first char, of the channel code. * * @param chan channel code like BHZ, only the first letter is used * @returns mimumum sample rate this could be */ export declare function minSampleRate(chan: string): number; /** * Calculates the maximum time coverage for a single miniseed record * given the record size (usually 512 or 4096) and the sample rate (Hertz). * This assumes 40 bytes of header and maximum compression of 2 samples * per byte (4 bit per sample) which is the best Steim2. * * @param recordSize record size (usually 512 or 4096) * @param sampleRate sample rate of record * @returns maximum interval of time that a full record could cover when * compression is at its most efficient */ export declare function maxTimeForRecord(recordSize: number, sampleRate: number): Duration; //# sourceMappingURL=mseedarchive.d.mts.map