USGS-CMG / stglib

Routines used by the USGS Coastal/Marine Hazards & Resources Program to process oceanographic time-series data
Other
16 stars 13 forks source link

remove a number of pings at the start of each burst #158

Closed rallen-usgs closed 8 months ago

rallen-usgs commented 9 months ago

So, the LISST-ABS requires a short warm up period before the data it collects is good. The docs for the instrument say it should be about 30 seconds, although it seems to be closer to 3 seconds based on inspecting the data. Is there a flag (or could one be added) to remove a certain number of pings at the start of each burst? I imagine this would live in the yaml file for each instrument. To start, it would be great if this flag worked for a vector (we've been using a vector to log the LISST-ABS), although maybe eventually other instruments would also like to have it.

Specifically, I imagine the flag is something like "n_warmup_pings", and it means that stglib ignores the data from the first "n_warmup_pings" during each burst. So the data output by stglib includes pings n_warmup_pings +1 to the total number of pings collected each burst.

dnowacki-usgs commented 9 months ago

Hi Rachel, I don't think anything like this exists right now, and your suggested approach seems good. Is the LISST-ABS set up as an analog input to the Vector when deployed in this configuration?

rallen-usgs commented 9 months ago

Thanks Dan! Yes, the vector is logging the LISST-ABS through analog input 1 at the moment. It could log through analog input 2 I suppose, but I can't imagine other places where it might log.

I'm guessing you asked because we'd want the flag to be targeted at the field where the LISST-ABS is logging? I.e. if we have the vector measuring high freq velocities (as a vector does) we may not want to remove the first 30 seconds, even if we do remove that period for the LISST-ABS.

dnowacki-usgs commented 9 months ago

Okay, yes, in reading the config file we could look for AnalogInput1_warmup_samples or something, and set those samples to nan. I don't think we want to fully remove them them since there is already the sample dimension which is used for other parameters of the Vector data.

Do you think we would always want to remove N samples at the beginning of every burst, or would a more general QAQC flag to remove samples (not just at the beginning) from all bursts be useful?

rallen-usgs commented 9 months ago

Setting the samples to nan seems pretty reasonable. Just something that ensures they don't mess with averages, since we know they are bad.

I think either could work. I'm trying to think of another reason we might want to remove pings in a burst, and all I'm coming up with right now is if we want to do something like match waves or turbulence between two ADVs and they are sampling for different amounts of time...? This seems far fetched, but I'm guessing it's pretty easy to name the field AnalogInput1_removed_pings (or something), such that it's general. I'll leave that decision to you, on whether it's better to make a general flag or specific one for the use we have at the moment.

dnowacki-usgs commented 8 months ago

Closed by #160.