Current terrain correction method requires the user to set
sites.sample_elevation(dem_file1, output_col="dem_elevation")
before terrain corrections, however this is applied to all grids when computed and it's disconnected from the TerrainCorrectionParameters()
To fix we propose a station_elevation_source parameter in TerrainCorrectionParameters() which has these options.
-
station_elevation_source = "height_ellipsoidal" use the sites.height_ellipsoidal field, but this will nearly always give problems if the DEM is orthometric. perhaps add a warning "is your DEM also ellipsoidal heights ?"
-
station_elevation_source = column name in sites object. If the user has another height field in the sites object, such as height_orthometric, allow them to select that - "height field" - enter the column name from sites object.
-
station_elevation_source = "from_dem" Samples the DEM specified in the TerrainCorrectionParameters() at the station location and uses that value. May need to take care with bathymetry.
If nothing is supplied then throw an error and do not proceed.
Return the actual height used field in the results table.
This should make it more explicit and flexible as to what heights have been used in which part.
Update example scripts and terrain correction docs.
Current terrain correction method requires the user to set
sites.sample_elevation(dem_file1, output_col="dem_elevation")before terrain corrections, however this is applied to all grids when computed and it's disconnected from the
TerrainCorrectionParameters()To fix we propose a
station_elevation_sourceparameter inTerrainCorrectionParameters()which has these options.station_elevation_source = "height_ellipsoidal" use the sites.height_ellipsoidal field, but this will nearly always give problems if the DEM is orthometric. perhaps add a warning "is your DEM also ellipsoidal heights ?"
station_elevation_source = column name in sites object. If the user has another height field in the sites object, such as height_orthometric, allow them to select that - "height field" - enter the column name from sites object.
station_elevation_source = "from_dem" Samples the DEM specified in the
TerrainCorrectionParameters()at the station location and uses that value. May need to take care with bathymetry.If nothing is supplied then throw an error and do not proceed.
Return the actual height used field in the results table.
This should make it more explicit and flexible as to what heights have been used in which part.
Update example scripts and terrain correction docs.