coastalimagelib/supportfunctions.py
def saveNetCDF(rect_arr, xyz, coords, outfile):

    """
    Saves the object rect_arr as a netcdf on the user's drive;
    rect_arr can be a rectified image, struct of images,
    pixel instruments, etc.

    """
    import xarray as xr

    # what data types will be used in the netcdf
    encoding = {"merged": {"dtype": "uint8", "_FillValue": 0}}
    # use xarray to create the netcdf
    ncstruct = xr.Dataset(
        {"merged": (["y", "x"], rect_arr)}, 
        coords={"xyz": xyz, "coord_type": coords, }
    )
    ncstruct.to_netcdf(outfile, encoding=encoding)

    Saves the object rect_arr as a netcdf on the user's drive;
    rect_arr can be a rectified image, struct of images,
    pixel instruments, etc.

    
Saves the object rect_arr as a netcdf on the user's drive;
rect_arr can be a rectified image, struct of images,
pixel instruments, etc.
Saves the object rect_arr as a netcdf on the user ' s drive ; rect_arr can be a rectified image struct of images pixel instruments etc .
def saveNetCDF(rect_arr, xyz, coords, outfile):
    import xarray as xr
    encoding = {"merged": {"dtype": "uint8", "_FillValue": 0}}
    ncstruct = xr.Dataset(
        {"merged": (["y", "x"], rect_arr)}, 
        coords={"xyz": xyz, "coord_type": coords, }
    )
    ncstruct.to_netcdf(outfile, encoding=encoding)
def saveNetCDF ( rect_arr , xyz , coords , outfile ) : import xarray as xr encoding = { "merged" : { "dtype" : "uint8" , "_FillValue" : 0 } } ncstruct = xr . Dataset ( { "merged" : ( [ "y" , "x" ] , rect_arr ) } , coords = { "xyz" : xyz , "coord_type" : coords , } ) ncstruct . to_netcdf ( outfile , encoding = encoding )
Saves the object rect_arr as a netcdf on the user's drive;
rect_arr can be a rectified image, struct of images,
pixel instruments, etc.
Saves the object rect_arr as a netcdf on the user ' s drive ; rect_arr can be a rectified image struct of images pixel instruments etc .
"""
    Saves the object rect_arr as a netcdf on the user's drive;
    rect_arr can be a rectified image, struct of images,
    pixel instruments, etc.

    """ # what data types will be used in the netcdf # use xarray to create the netcdf
rect_arr
xyz
coords
outfile