Commit 6b70a022 authored by Éric Thiébaut's avatar Éric Thiébaut
Browse files

Rename wavefront sensor as Shack-Hartmann

parent a6b1f3b2
......@@ -70,6 +70,7 @@ include_HEADERS = \
tao-remote-sensors-private.h \
tao-rwlocked-objects.h \
tao-rwlocked-objects-private.h \
tao-shackhartmann.h \
tao-shared-arrays.h \
tao-shared-arrays-private.h \
tao-shared-memory.h \
......@@ -78,8 +79,7 @@ include_HEADERS = \
tao-test-preprocessing.h \
tao-threadpools.h \
tao-threads.h \
tao-utils.h \
tao-wavefront-sensors.h
tao-utils.h
libtao_la_SOURCES = \
arrays.c \
......@@ -101,12 +101,12 @@ libtao_la_SOURCES = \
remote-sensors.c \
rwlocked-objects.c \
semaphores.c \
shackhartmann.c \
shared-arrays.c \
shared-objects.c \
threadpools.c \
threads.c \
utils.c \
wavefront-sensors.c
utils.c
libtao_la_LIBADD = $(OTHER_LIBS)
libtao_la_LDFLAGS = -version-info @version_info@
......
......@@ -69,7 +69,7 @@ extern tao_remote_sensor* tao_remote_sensor_create(
// Offsets and sizes of layout indices and definitions of sub-images in
// a `tao_remote_sensor_config` structure.
size_t inds_elsize = sizeof(long);
size_t subs_elsize = sizeof(tao_wavefront_sensor_subimage);
size_t subs_elsize = sizeof(tao_subimage);
size_t subs_align = sizeof(double);
size_t config_inds_size = max_ninds*inds_elsize;
size_t config_subs_size = max_nsubs*subs_elsize;
......@@ -91,7 +91,7 @@ extern tao_remote_sensor* tao_remote_sensor_create(
// Size of header part and of a single data element in data-frame.
size_t header_size = TAO_OFFSET_OF(tao_remote_sensor_dataframe, data);
size_t data_elsize = sizeof(tao_wavefront_sensor_data);
size_t data_elsize = sizeof(tao_shackhartmann_data);
// Size of a data-frame.
size_t stride = round_size(
......@@ -129,7 +129,7 @@ tao_status tao_remote_sensor_check_config(
const tao_remote_sensor* wfs,
const tao_remote_sensor_config* cfg,
const long* inds,
const tao_wavefront_sensor_subimage* subs)
const tao_subimage* subs)
{
if (wfs == NULL || cfg == NULL || inds == NULL || subs == NULL) {
tao_store_error(__func__, TAO_BAD_ADDRESS);
......@@ -137,7 +137,7 @@ tao_status tao_remote_sensor_check_config(
}
long width = wfs->config.camera.width;
long height = wfs->config.camera.height;
if (tao_wavefront_sensor_check_config(
if (tao_shackhartmann_check_config(
&cfg->base, inds, subs, width, height) != TAO_OK) {
return TAO_ERROR;
}
......@@ -198,7 +198,7 @@ tao_status tao_remote_sensor_copy_config(
memcpy(dst->inds, src->inds, ninds*sizeof(long));
memcpy(TAO_COMPUTED_ADDRESS(dst, dst->subs_offset),
TAO_COMPUTED_ADDRESS(src, src->subs_offset),
nsubs*sizeof(tao_wavefront_sensor_subimage));
nsubs*sizeof(tao_subimage));
}
return TAO_OK;
}
......
// wavefront-sensors.c -
// shackhartmann.c -
//
// Management of wavefront sensors.
// Implementation of Shack-Hartmann wavefront sensors in TAO.
//
//-----------------------------------------------------------------------------
//
......@@ -13,12 +13,12 @@
#include "tao-errors.h"
#include "tao-layouts.h"
#include "tao-wavefront-sensors.h"
#include "tao-shackhartmann.h"
tao_status tao_wavefront_sensor_check_config(
const tao_wavefront_sensor_config* cfg,
tao_status tao_shackhartmann_check_config(
const tao_shackhartmann_config* cfg,
const long* inds,
const tao_wavefront_sensor_subimage* subs,
const tao_subimage* subs,
long width,
long height)
{
......
......@@ -21,7 +21,7 @@ TAO_BEGIN_DECLS
* Structure describing the complete configuration of a wavefront sensor.
*/
typedef struct tao_remote_sensor_config_ {
tao_wavefront_sensor_config base;
tao_shackhartmann_config base;
struct {
long width;
long height;
......@@ -63,7 +63,7 @@ struct tao_remote_sensor_ {
typedef struct tao_remote_sensor_dataframe_ {
tao_dataframe_header base;
long nsubs;
tao_wavefront_sensor_data data[1];
tao_shackhartmann_data data[1];
} tao_remote_sensor_dataframe;
extern tao_status tao_remote_sensor_copy_config(
......
......@@ -13,7 +13,7 @@
#define TAO_REMOTE_SENSORS_H_ 1
#include <tao-basics.h>
#include <tao-wavefront-sensors.h>
#include <tao-shackhartmann.h>
#include <tao-remote-objects.h>
TAO_BEGIN_DECLS
......@@ -86,7 +86,7 @@ typedef struct tao_remote_sensor_ tao_remote_sensor;
* @param max_ninds The maximum number of nodes in of the 2-dimensional layout
* grid.
*
* @param max_nsubs The maximum number of the sub-images.
* @param max_nsubs The maximum number of sub-images.
*
* @param flags Permissions for clients and options.
*
......
// tao-wavefront-sensors.h -
// tao-shackhartmann.h -
//
// Definitions for wavefront sensors in TAO.
// Definitions for Shack-Hartmann wavefront sensors in TAO.
//
//-----------------------------------------------------------------------------
//
......@@ -9,23 +9,23 @@
//
// Copyright (C) 2022, Éric Thiébaut.
#ifndef TAO_WAVEFRONT_SENSORS_H_
#define TAO_WAVEFRONT_SENSORS_H_ 1
#ifndef TAO_SHACK_HARTMANN_H_
#define TAO_SHACK_HARTMANN_H_ 1
#include <tao-basics.h>
TAO_BEGIN_DECLS
/**
* @defgroup WavefrontSensors Wavefront sensors
* @defgroup WavefrontSensors Shack-Hartmann wavefront sensors
*
* @brief Definitions for wavefront sensors.
* @brief Definitions for Shack-Hartmann wavefront sensors.
*
* @{
*/
/**
* Wavefront sensing algorithms.
* Possible wavefront sensing algorithms.
*/
typedef enum tao_algorithm_ {
TAO_CENTER_OF_GRAVITY = 0,
......@@ -66,45 +66,45 @@ typedef struct tao_measured_position_ {
/**
* Definition of a wavefront sensor sub-image.
*/
typedef struct tao_wavefront_sensor_subimage_ {
typedef struct tao_subimage_ {
tao_bounding_box box;///< Bounding box of the sub-image.
tao_position ref;///< Reference position in the sub-image.
} tao_wavefront_sensor_subimage;
} tao_subimage;
/**
* Wavefront sensor elementary data.
*
* This structure represents an elementary data in the output data-frames
* delivered by a wavefront sensor.
* delivered by a Shack-Hartmann wavefront sensor.
*/
typedef struct tao_wavefront_sensor_data_ {
typedef struct tao_shackhartmann_data_ {
// The first members must be identical to those of the structure
// `tao_wavefront_sensor_subimage`.
// `tao_subimage`.
tao_bounding_box box;///< Bounding box of the sub-image.
tao_position ref;///< Reference position in the sub-image.
// Memebers not in `tao_wavefront_sensor_subimage` structure.
// Memebers not in `tao_subimage` structure.
tao_measured_position pos;///< Measured position (relative to the
/// reference).
double alpha;///< Intensity factor.
double epsilon;///< Quality factor.
} tao_wavefront_sensor_data;
} tao_shackhartmann_data;
/**
* Wavefront sensor configuration.
* Shack-Hartmann wavefront sensor configuration.
*
* This structure represents the fixed size part of a wavefront sensor
* configuration. The variable size parts (the layout of the sub-images grid
* and the list of sub-images definitions) are provided separately.
* This structure represents the fixed size part of a Shack-Hartmann wavefront
* sensor configuration. The variable size parts (the layout of the sub-images
* grid and the list of sub-images definitions) are provided separately.
*/
typedef struct tao_wavefront_sensor_config_ {
typedef struct tao_shackhartmann_config_ {
double forgetting_factor;
double restoring_force;
double max_excursion;
tao_algorithm algo;
long nsubs;///< Number of sub-images.
long dims[2];///< Dimensions of sub-image grid.
} tao_wavefront_sensor_config;
} tao_shackhartmann_config;
/**
* Check wavefront sensor configuration.
......@@ -121,10 +121,10 @@ typedef struct tao_wavefront_sensor_config_ {
*
* @return @ref TAO_OK on success; @ref TAO_ERROR in case of failure.
*/
extern tao_status tao_wavefront_sensor_check_config(
const tao_wavefront_sensor_config* cfg,
extern tao_status tao_shackhartmann_check_config(
const tao_shackhartmann_config* cfg,
const long* inds,
const tao_wavefront_sensor_subimage* subs,
const tao_subimage* subs,
long width,
long height);
......@@ -134,4 +134,4 @@ extern tao_status tao_wavefront_sensor_check_config(
TAO_END_DECLS
#endif // TAO_WAVEFRONT_SENSORS_H_
#endif // TAO_SHACK_HARTMANN_H_
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment