Repository navigation
waveSpectralAnalysis — Versión 1.2.0
Cambios en la versión 1.2.0
wsa_awac_read
Se realizaron varias mejoras en el control de calidad de los datos AWAC:
- Se corrigió la verificación del tilt, ya que anteriormente este parámetro no se calculaba adecuadamente.
- Como parte de esta corrección, se agregaron al struct de salida las variables:
tiltheading_jump_flagtilt_jump_flag
- Se modificó el límite por defecto de
bad_tilta 30°, correspondiente al máximo permitido por el instrumento según Nortek.
wsa_awac_clean
Se amplió la información almacenada durante el proceso de limpieza de los datos AWAC.
Se agregaron las siguientes variables a la sección cleaning del struct de datos limpios:
is_bad_burstNumber_of_raw_wave_measurementsbad_indices_rawgood_indices_raw
wsa_awac_nc_write
Se realizaron varias correcciones y mejoras en la escritura de archivos NetCDF:
- Se corrigió la escritura de las variables de control de calidad de tipo flag. Anteriormente, estas variables se declaraban con tamaño
nBurst, aunque su dimensión real corresponde a la cantidad deBurst Raw. Esto provocaba que parte de las variables se completara con valores de relleno de NetCDF. Las variables ahora se almacenan con sus dimensiones correctas. - Se agregó la escritura de la variable
pressure_sample_flag. - Se agregó la escritura de las variables asociadas con el tilt y sus respectivos flags de control de calidad.
- Se corrigió el atributo
long_namede la variablewarning_tilt_flag. - Se agregó una verificación para validar la eliminación de archivos NetCDF raw existentes antes de generar un nuevo archivo.
- Se redefinió la función auxiliar
wsa_nc_create_var, encargada de la creación y escritura de variables, con el fin de manejar de forma más robusta las variables de los archivos NetCDF. - Se incorporaron verificaciones y reintentos durante la escritura para manejar fallos asociados con errores producidos por aperturas sucesivas del archivo NetCDF.
wsa_awac_nc_read_raw
Se actualizó la lectura de archivos NetCDF crudos existentes:
- Se agregó la lectura de la variable
pressure_sample_flag.
wsa_bandpass_filter y wsa_awac_preprocess
Se implementó un nuevo filtro pasabanda FIR mediante la función wsa_bandpass_filter.
El filtro permite:
- Filtrar las señales principales utilizadas durante el procesamiento.
- Extraer las señales correspondientes a la banda de infragravedad (IG).
El nuevo procedimiento de filtrado fue incorporado a la función de preprocesamiento wsa_awac_preprocess.
wsa_dirspectrum
Se realizaron mejoras tanto en la función principal de estimación del espectro direccional como en los métodos direccionales utilizados internamente.
Método MEM
- Se agregaron nuevas variables de salida a los structs de resultados.
- Se incorporó una verificación interna de las restricciones de los coeficientes complejos
C1yC2.
Método TFS
- Se agregó una verificación de valores negativos.
- Se incorporó información adicional de salida mediante un struct
info.
Mejoras comunes a MEM y TFS
- Se mejoró el procedimiento de integración del área bajo la curva utilizado para normalizar la función de distribución direccional.
Selección del rango frecuencial
- Se agregó a
wsa_dirspectrumun parámetro que permite indicar el rango de frecuencias que se desea procesar. - Esta opción permite reducir el costo computacional y el uso de memoria cuando no es necesario calcular el espectro direccional para todo el rango frecuencial disponible.
Función de despiking de AST
Se corrigió un error en la función de eliminación de picos (despiking) de las señales AST.
Anteriormente, la variable de salida ast_despike no se inicializaba como una copia del arreglo de entrada. Esto podía producir salidas con tamaños inesperados y diferentes de las dimensiones del arreglo original.
La salida ahora se inicializa correctamente y conserva las dimensiones de la señal de entrada.
wsa_extract_band
Se realizaron mejoras en la función utilizada para extraer bandas del espectro durante la estimación de parámetros espectrales:
- Se mejoró la extracción de las bandas frecuenciales mediante interpolación en sus extremos. De esta manera, los límites de cada banda ya no dependen directamente de la discretización del vector de frecuencias, lo que mejora la estimación de los momentos espectrales dentro de los rangos establecidos.
- Se corrigió un error que se presentaba al calcular parámetros espectrales para una banda cuyo último dato corresponde a la frecuencia inmediatamente anterior a la frecuencia de Nyquist. Ahora, cuando la frecuencia de Nyquist no se encuentra explícitamente disponible en el vector de frecuencias, el límite superior de la banda puede adaptarse correctamente a la última frecuencia disponible.
Full Changelog: v1.1.1...v1.2.0
waveSpectralAnalysis — Version 1.2.0
Changes in version 1.2.0
wsa_awac_read
Several improvements were made to the quality control of AWAC data:
- The tilt verification was corrected, as this parameter was previously not calculated properly.
- As part of this correction, the following variables were added to the output struct:
tiltheading_jump_flagtilt_jump_flag
- The default
bad_tiltthreshold was changed to 30°, corresponding to the maximum value allowed by the instrument according to Nortek.
wsa_awac_clean
The information stored during the AWAC data-cleaning process was expanded.
The following variables were added to the cleaning section of the cleaned-data struct:
is_bad_burstNumber_of_raw_wave_measurementsbad_indices_rawgood_indices_raw
wsa_awac_nc_write
Several corrections and improvements were made to NetCDF file writing:
- The writing of quality-control flag variables was corrected. Previously, these variables were defined with size
nBurst, although their actual dimension corresponds to the number ofBurst Rawrecords. This caused part of the variables to be filled with NetCDF fill values. The variables are now stored using their correct dimensions. - Writing support for the
pressure_sample_flagvariable was added. - Writing support for the tilt-related variables and their corresponding quality-control flags was added.
- The
long_nameattribute of thewarning_tilt_flagvariable was corrected. - A verification step was added to validate the deletion of existing raw NetCDF files before generating a new file.
- The auxiliary function
wsa_nc_create_var, responsible for creating and writing variables, was redefined to provide more robust handling of NetCDF variables. - Additional checks and retries were incorporated into the writing process to handle failures associated with errors caused by repeated opening of the NetCDF file.
wsa_awac_nc_read_raw
Reading of existing raw NetCDF files was updated:
- Reading support for the
pressure_sample_flagvariable was added.
wsa_bandpass_filter and wsa_awac_preprocess
A new FIR band-pass filter was implemented through the wsa_bandpass_filter function.
The filter allows:
- Filtering of the main signals used during processing.
- Extraction of signals corresponding to the infragravity (IG) frequency band.
The new filtering procedure was incorporated into the wsa_awac_preprocess preprocessing function.
wsa_dirspectrum
Improvements were made both to the main directional-spectrum estimation function and to the directional methods used internally.
MEM method
- New output variables were added to the result structs.
- An internal verification of the constraints on the complex coefficients
C1andC2was added.
TFS method
- A check for negative values was added.
- Additional output information was incorporated through an
infostruct.
Common improvements to MEM and TFS
- The area-under-the-curve integration procedure used to normalize the directional distribution function was improved.
Frequency-range selection
- A new parameter was added to
wsa_dirspectrumto specify the frequency range to be processed. - This option reduces computational cost and memory usage when calculation of the directional spectrum over the entire available frequency range is not required.
AST despiking function
A bug in the AST signal despiking function was corrected.
Previously, the ast_despike output variable was not initialized as a copy of the input array. This could produce outputs with unexpected sizes that differed from the dimensions of the original array.
The output is now initialized correctly and preserves the dimensions of the input signal.
wsa_extract_band
Several improvements were made to the function used to extract spectral bands during spectral-parameter estimation:
- Frequency-band extraction was improved by interpolating the band endpoints. As a result, the limits of each band no longer depend directly on the discretization of the frequency vector, improving the estimation of spectral moments within the specified frequency ranges.
- An error that occurred when calculating spectral parameters for a band whose last data point corresponds to the frequency immediately below the Nyquist frequency was corrected. When the Nyquist frequency is not explicitly available in the frequency vector, the upper band limit can now adapt correctly to the highest available frequency.
Full Changelog: v1.1.1...v1.2.0