generate_new_mosaic¶
- HSTB.kluster.fqpr_convenience.generate_new_mosaic(fqpr_inst=None, tile_size=1024.0, gridding_algorithm='mean', resolution=8.0, process_backscatter=True, create_mosaic=True, angle_varying_gain=True, avg_angle=45.0, avg_line=None, avg_bin_size=1.0, overwrite_existing_avg=True, process_backscatter_fixed_gain_corrected=True, process_backscatter_tvg_corrected=True, process_backscatter_transmission_loss_corrected=True, process_backscatter_area_corrected=True, use_dask=False, output_path=None, export_path=None, export_format='geotiff', export_resolution=None, client=None)¶
Using the bathygrid create_grid convenience function, process backscatter and generate a new single resolution backscatter mosaic for the provided Kluster fqpr instance(s). This is a three part process, including processing backscatter and saving that data to disk as a new variable, generating avg table and correcting for angle varying gain, building a new backscatter mosaic. You can enable/disable these processes as you choose, for example:
Create mosaic from existing backscatter data = process_backscatter=False, create_mosaic=True, angle_varying_gain=True, overwrite_existing_avg=False
Create mosaic and process backscatter at the same time (what you do for new data) = default options
Just process backscatter, no mosaic = process_backscatter=True, create_mosaic=False, angle_varying_gain=False
If fqpr_inst is provided and is not a list, generates a mosaic based on that specific fqpr converted instance.
If fqpr_inst provided is a list of fqpr instances, will concatenate these instances and build a single mosaic.
Returns an instance of the surface class and optionally saves the surface to disk.
- Parameters
fqpr_inst (
Union[Fqpr,list,None]) – instance or list of instances of fqpr_generation.Fqpr class that contains generated backscatter data, see perform_all_processing or reload_data. If None is provided, will create an empty surface.tile_size (
float) – main tile size, the size in meters of the tiles within the grid, a larger tile size will improve performance, but size should be at most 1/2 the length/width of the survey areagridding_algorithm (
str) – algorithm to grid by, one of ‘mean’resolution (
float) – resolution of the gridded data in the Tilesprocess_backscatter (
bool) – set to True if you want to generate the ‘backscatter’ variable and save this variable to disk, overwriting any existing processed backscatter. ‘backscatter’ must exist for you to create a new mosaic. Set to False only if you want to use existing ‘backscatter’ variablecreate_mosaic (
bool) – set to True if you want to generate a new Bathygrid backscatter mosaic, saving to disk at output_pathangle_varying_gain (
bool) – set to True if you want to normalize the processed ‘backscatter’ variable to the value at avg_angle prior to generating the mosaic. Will use avg_line or the first line in the first dataset to generate the avg table. avg table is then saved to the attribution in each fqpr provided.avg_angle (
float) – if angle_varying_gain, reference angle used in the angle varying gain processavg_line (
Optional[str]) – if angle_varying_gain, multibeam file name used for the subset of data used in angle varying gain process. if None, will use the first line in the first datasetavg_bin_size (
float) – if angle_varying_gain, the size of the bins in the avg table in degrees.overwrite_existing_avg (
bool) – if True, will overwrite the existing avg table with a new one, if angle_varying_gain is True. if False, will use the existing avg table.process_backscatter_fixed_gain_corrected (
bool) – if True and process_backscatter is True, will remove fixed gain from the raw reflectivity during backscatter processing, default is True and should probably be left so except for research purposes.process_backscatter_tvg_corrected (
bool) – if True and process_backscatter is True, will remove tvg from the raw reflectivity during backscatter processing, default is True and should probably be left so except for research purposes.process_backscatter_transmission_loss_corrected (
bool) – if True and process_backscatter is True, will add a transmission loss corrector to the raw reflectivity during backscatter processing, default is True and should probably be left so except for research purposes.process_backscatter_area_corrected (
bool) – if True and process_backscatter is True, will add an insonified area corrector to the raw reflectivity during backscatter processing, default is True and should probably be left so except for research purposes.use_dask (
bool) – if True, will start a dask LocalCluster instance and perform the gridding in paralleloutput_path (
Optional[str]) – if provided, will save the Bathygrid to this pathexport_path (
Optional[str]) – if provided, will export the Bathygrid to file using export_format and export_resolutionexport_format (
str) – format option, one of ‘csv’, ‘geotiff’, ‘bag’export_resolution (
Optional[float]) – if provided, will only export the given resolutionclient (
Optional[Client]) – dask.distributed.Client instance, if you don’t include this, it will automatically start a LocalCluster with the default options, if you set use_dask to True
- Returns
BathyGrid instance for the newly created surface
- Return type
BathyGrid