You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@2320sharon this is a description of the workflow I have developed and intend to build here in SDStools, fyi
Currently the Coastseg workflow results in a merged tidally corrected shoreline timeseries file, which I believe most end-users will view as 'the result', transect_time_series_tidally_corrected.csv. Then, as discussed here, we want the option of reordering the data so it is time (rows) x transect (cols), with missing values as NaN. I believe Coastseg should do that, but I also think we should do it for all numeric variables, i.e., tide, x, and y. So, if cs is your dataframe
denoising
Use a wavelet filter, calibrated over a number of scales
from functools import partial
from skimage.restoration import calibrate_denoiser, denoise_wavelet
# rescale_sigma=True required to silence deprecation warnings
_denoise_wavelet = partial(denoise_wavelet, rescale_sigma=True)
# Parameters to test when calibrating the denoising algorithm
parameter_ranges = {'sigma': np.arange(0.02, 0.2, 0.02),
'wavelet': ['db1', 'db2'],
'convert2ycbcr': [False, False]}
# Denoised image using default parameters of `denoise_wavelet`
default_output = denoise_wavelet(cs_matrix_inpaint, rescale_sigma=True)
# Calibrate denoiser
calibrated_denoiser = calibrate_denoiser(cs_matrix_inpaint,
_denoise_wavelet,
denoise_parameters=parameter_ranges)
# Denoised image using calibrated denoiser
cs_inpaint_denoised = calibrated_denoiser(cs_matrix_inpaint)
Application of these result in
finally, computing shoreline change relative to initial
I propose instead of subtracting the initial shoreline, we subtract an average of the first N shorelines, due to noise considerations. It efficiently does this as a matrix-vector operation rather than apply the correction to each shoreline in turn
N = 10
shore_change = (cs_inpaint_denoised - cs_inpaint_denoised[:N,:].mean(axis=0)).T
This results in
Mean shoreline diaplecement across all transects is
Hi @dbuscombe-usgs
Sorry for the late response this got lost in my notifications.
I've implemented most of the changes in SatelliteShorelines/CoastSeg#224 which means coastseg generates 5 files now:
transect_time_series.csv
matrix of date vs transect id (raw)
transect_time_series_merged.csv
dataframe of date, transect id, transect x,y , cross distance
matrix of date, transect id and the predicted tide (AKA date x transect id)
I have a few clarification questions now that I've seen this issue.
Currently the transect_time_series_tidally_corrected_matrix.csv drops any dates where none of the shoreline points on that date intersected any of the transects, is that okay or should they be rows with only NaNs like in transect_time_series.csv?
Do you want CoastSeg to generate 2 extra files being the ones below? I'm not sure if these are necessary since it seems like they can easily be generated by script in SDS_tools, but if you think that end users will find them helpful, then I'm happy to add them.
@2320sharon this is a description of the workflow I have developed and intend to build here in SDStools, fyi
Currently the Coastseg workflow results in a merged tidally corrected shoreline timeseries file, which I believe most end-users will view as 'the result', transect_time_series_tidally_corrected.csv. Then, as discussed here, we want the option of reordering the data so it is time (rows) x transect (cols), with missing values as NaN. I believe Coastseg should do that, but I also think we should do it for all numeric variables, i.e., tide, x, and y. So, if
cs
is your dataframeSimple! this is what those matrices look like for my Elwha site
(I'm not sure why my transect numbers are non-ordinal w.r.t x and y...)
Ok, and I propose Coastseg stop there, and this toolbox (SDStools) takes over the reins for basic analyses and plotting, etc.
The first thing I propose here is a new way to interpolate and filter the data
Use biharmonic inpainting
Use a wavelet filter, calibrated over a number of scales
Application of these result in
I propose instead of subtracting the initial shoreline, we subtract an average of the first N shorelines, due to noise considerations. It efficiently does this as a matrix-vector operation rather than apply the correction to each shoreline in turn
This results in
Mean shoreline diaplecement across all transects is
Mean shore displacement across all time is
The text was updated successfully, but these errors were encountered: