pysap.extensions.formating#

This module contains all the function to flatten properly the cube from a ISAP .fits raw data.

get_hbl(A)[source]#

Return the half-bottom-left of the given array.

get_hbr(A)[source]#

Return the half-bottom-right of the given array.

get_htl(A)[source]#

Return the half-top-left of the given array.

get_htr(A)[source]#

Return the half-top-right of the given array.

get_hr(A)[source]#

Return the half-right of the given array.

get_hl(A)[source]#

Return the half-left of the given array.

get_hb(A)[source]#

Return the half-bottom of the given array.

get_ht(A)[source]#

Return the half-top of the given array.

set_hbl(A, a)[source]#

Return the half-bottom-left of the given array.

set_hbr(A, a)[source]#

Return the half-bottom-right of the given array.

set_htl(A, a)[source]#

Return the half-top-left of the given array.

set_htr(A, a)[source]#

Return the half-top-right of the given array.

set_hr(A, a)[source]#

Return the half-right of the given array.

set_hl(A, a)[source]#

Return the half-left of the given array.

set_hb(A, a)[source]#

Return the half-bottom of the given array.

set_ht(A, a)[source]#

Return the half-top of the given array.

flatten_undecimated_n_bands(cube, trf)[source]#

Flatten the decomposition coefficients from a cube to a vector. flatten_undecimated_n_bands concerns the cube where each layer correspond to a undecimated band. We can have multiple bands per scale, which lead to nb_scale * nb_band_per_scale for one dimension.

Parameters

cube (numpy.ndarray) – The cube that contains the decomposition coefficients

Returns

The flattened cube

Return type

numpy.ndarray

flatten_decimated_1_bands(cube, trf)[source]#

Flatten the decomposition coefficients from a cube to a vector. flatten_decimated_1_bands concerns the cube where it’s actually a 2d-array like the classic wavelet 2d-transform of 1 bands. It has the same formating than the 3 bands but the v and h bands or set to 0.

Parameters

cube (numpy.ndarray) – The cube that contains the decomposition coefficients

Returns

The flattened cube

Return type

numpy.ndarray

flatten_decimated_3_bands(cube, trf)[source]#

Flatten the decomposition coefficients from a cube to a vector. flatten_decimated_3_bands concerns the cube where it’s actually a 2d-array like the classic wavelet 2d-transform of 3 bands.

Parameters

cube (numpy.ndarray) – The cube that containes the decomposition coefficients

Returns

The flattened cube

Return type

numpy.ndarray

flatten_vector(cube, trf)[source]#

Flatten the decomposition coefficients from a cube to a vector. flatten_vector concerns the curvelet-cube where it’s already a vector.

Parameters

cube (numpy.ndarray) – The cube that containes the decomposition coefficients

Returns

The flattened cube

Return type

numpy.ndarray

flatten_decimated_feauveau(cube, trf)[source]#

Flatten decomposition coefficients from a cube to a vector. flatten_decimated_feauveau concern the cube where it’s the Feauveau decimated.

Parameters

cube (numpy.ndarray) – The cube that containes the decomposition coefficients

Returns

The flattened cube

Return type

numpy.ndarray

inflated_undecimated_n_bands(trf)[source]#

Inflated the decomposition coefficients from a vector to a cube. inflated_undecimated_n_bands concerns the vector where each layer correspond to a undecimated band. We can have multiple bands per scale, which lead to nb_scale * nb_band_per_scale for one dimension.

Returns

The unflattened cube

Return type

numpy.ndarray

inflated_decimated_1_bands(trf)[source]#

Inflated the decomposition coefficients from a vector to a cube. inflated_decimated_1_bands concerns the vector where it’s actually a 2d-array like the classic wavelet 2d-transform of 1 bands. It has the same formating than the 3 bands but the v and h bands or set to 0.

Returns

The unflattened cube

Return type

numpy.ndarray

inflated_decimated_3_bands(trf)[source]#

Inflated the decomposition coefficients from a vector to a cube. inflated_decimated_3_bands concern the vector where it’s actually a 2d-array like the classic wavelet 2d-transform of 3 bands.

Returns

The unflattened cube

Return type

numpy.ndarray

inflated_vector(trf)[source]#

Inflated the decomposition coefficients from a vector to a cube. inflated_vector concerns the vector where it’s encode a curvelet.

Returns

The unflattened cube

Return type

numpy.ndarray

inflated_decimated_feauveau(trf)[source]#

Inflated the decomposition coefficients from a vector to a cube. inflated_decimated_feauveau concerns the vector where it’s the Feauveau decimated.

Returns

The unflattened cube

Return type

numpy.ndarray