hypso.rgb.product#
RGB camera products: the camera image as a CF NetCDF file.
The camera is not a hypso.Product: that models a spectral cube with wavelengths, calibration levels and SRFs, none of which a three-channel, uncalibrated camera has. A camera product is an xarray Dataset with the same conventions:
R,G,Bon(y, x): demosaiced counts in the camera’s own frame (not resampled), stored as uint8 (the camera’s 8 bits; the bilinear demosaic is rounded);latitude,longitudeper pixel andin_hsi_swathwhen registered (hypso.rgb.register_camera()); unregistered products have none;attributes: instrument
RGB, satellite, target, acquisition time,processing_levelL1A(uncalibrated counts), the registration, CF/ACDD.
File names follow hypso.io.naming with the RGB instrument token:
HYPSO2_RGB.<time>.<target>.L1A.nc. Satpy reads them with the
hypso_rgb_l1a reader (true_color composite).
Functions#
|
The product's file name, e.g. |
|
A camera product from a camera image, georeferenced if registered. |
|
Read a camera product written by |
|
Write a camera product (default name from |
Module Contents#
- hypso.rgb.product.camera_filename(ds, label=None)[source]#
The product’s file name, e.g.
HYPSO2_RGB.20250404T022723.ariake.L1A.nc(with the grid token for ahypso.rgb.regrid_camera()result).- Parameters:
ds (xarray.Dataset)
label (str)
- Return type:
- hypso.rgb.product.camera_product(camera, registration=None, hsi=None, sat_id='HYPSO-2', target=None)[source]#
A camera product from a camera image, georeferenced if registered.
- Parameters:
camera (xarray.DataArray) –
(y, x, channel)image fromhypso.rgb.read_camera_image().registration (hypso.rgb.CameraRegistration, optional) – From
hypso.rgb.register_camera(); whenok, latitude and longitude are added. A failed registration is recorded, without geolocation.hsi (hypso.Product, optional) – The capture’s HSI product: target, satellite and
in_hsi_swath.sat_id (str, default "HYPSO-2") – Used when no
hsiis given (HYPSO-2 carries the camera).target (str, optional) – Capture target; default from
hsi, else from the image file name.
- Return type:
- hypso.rgb.product.open_camera(path)[source]#
Read a camera product written by
write_camera().- Return type:
- hypso.rgb.product.write_camera(ds, path=None, out_dir=None, label=None)[source]#
Write a camera product (default name from
camera_filename()inout_dir). Channels uint8, geolocation float32, zlib level 4.- Parameters:
ds (xarray.Dataset)
label (str)
- Return type: