Skip to content
Snippets Groups Projects
Commit da52801c authored by Gerald Mösenlechner's avatar Gerald Mösenlechner
Browse files

Release of Version 1.2

parent a873dc17
No related branches found
No related tags found
No related merge requests found
Showing
with 160152 additions and 54 deletions
***************************************************************** *****************************************************************
* ARIEL FGS HFS Repository, ARIEL-UVIE-PL-ML-001 0.2, CHANGELOG * * ARIEL FGS HFS Repository, ARIEL-UVIE-PL-ML-001 1.2, CHANGELOG *
***************************************************************** *****************************************************************
################################################################################ ################################################################################
...@@ -124,7 +124,7 @@ V1.0: ...@@ -124,7 +124,7 @@ V1.0:
- No change to close neighbour confusion, a correction will be provided in - No change to close neighbour confusion, a correction will be provided in
a future update a future update
################################################################################ ################################################################################
V1.0: V1.1:
31.January, 2024 Gerald Mösenlechner <gerald.moesenlechner@univie.ac.at> 31.January, 2024 Gerald Mösenlechner <gerald.moesenlechner@univie.ac.at>
Fixed Issues: Fixed Issues:
...@@ -147,11 +147,43 @@ V1.0: ...@@ -147,11 +147,43 @@ V1.0:
- Added testplan and report - Added testplan and report
- fixed CoG position update in Trackign algorithm - fixed CoG position update in Tracking algorithm
- Added alternative PSFs to model other WFE
Open Issues: Open Issues:
- State Preservation: still discrepency on the first centroid. - State Preservation: still discrepency on the first centroid.
################################################################################ ################################################################################
V1.2:
03.May, 2024 Gerald Mösenlechner <gerald.moesenlechner@univie.ac.at>
Fixed Issues:
- Fixed saving of state
- added circular FoV
- added separate delays for mode and channel transitions
- updated noise model to NDR
- updated Hot Pixel implementation
- Fixed shift intruduced by smeaing kernel
- fixed issues in Target aquisition
- fixed error in Centroid validation
- added check for saturated images
- added compliance to test report
- added output files for tests
- updated Star validation table
- updated gain modeling
- switched HFS to 80 Hz
################################################################################
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
File added
************************************************************ ************************************************************
* ARIEL FGS HFS, , ARIEL-UVIE-PL-ML-001 1.1, JUSTIFICATION * * ARIEL FGS HFS, , ARIEL-UVIE-PL-ML-001 1.2, JUSTIFICATION *
************************************************************ ************************************************************
This note describes the justification of the parameters and values This note describes the justification of the parameters and values
used in the HFS. used in the HFS.
All detector parameters are based on the Ariel Performance All detector parameters are based on the Ariel Mission Parameter
Parameters Database Version 3.0.0. The Psf's provided are Database (MPDB), release 3. The Psf's provided are
the current best estimate available from optical simulations. the current best estimate available from optical simulations.
Updates of these parameters will be provided with future versions Updates of these parameters will be provided with future versions
of the Performance Parameters Database. of the Performance Parameters Database.
...@@ -17,20 +17,18 @@ latest analyses provided in ARIEL-UVIE-PL-TN-001 Iss 1.3. ...@@ -17,20 +17,18 @@ latest analyses provided in ARIEL-UVIE-PL-TN-001 Iss 1.3.
################################################################## ##################################################################
Limitations of the Simulations: Limitations of the Simulations:
The current HFS version does not include the simulation of high The current HFS version does not include the simulation of high
frequency jitter. Based on analyses provided in frequency jitter. Based on analyses provided in
ARIEL-UVIE-PL-TN-001 Iss 1.2m these features hardly impact the ARIEL-UVIE-PL-TN-001 Iss 1.2m these features hardly impact the
performance of the algorithms and is replaced in te HFS by a performance of the algorithms and is replaced in te HFS by a
configurable normal distribution that can be added to the centroid. configurable normal distribution that can be added to the centroid.
The simulator also does not cover glitches caused by Cosmic-ray The simulator also does not model glitches caused by Cosmic-ray
impacts. Most notably, the phenomenon called "Spaceballs" which impacts. Most notably, the phenomenon called "Spaceballs" which
generates extended bright regions that saturate the detector are generates extended bright regions that saturate the detector are
not included in the current version. These features can have an not included in the current version. These features can have an
impact on the centroid and can lead to the loss of measurements. impact on the centroid and can lead to the loss of measurements.
The entire effect of these features is still under investigation The entire effect of these features is still under investigation
and the possibility to simulate them will be provided in future and the possibility. It is possible to model this behavior outside
versions. It is possible to model this behavior outside of the of the HFS by setting the measurement to invalid for a given amount
HFS by setting the measurement to invalid for a given amount of of time. The current values are given in ARIEL-UVIE-PL-TN-002 Iss 1.2
time. The current values are given in ARIEL-UVIE-PL-TN-002 Iss 1.2
***************************************************** *****************************************************
* ARIEL FGS HFS, ARIEL-UVIE-PL-ML-001 1.1, MANUAL * * ARIEL FGS HFS, ARIEL-UVIE-PL-ML-001 1.2, MANUAL *
***************************************************** *****************************************************
The FGS HFS is based on the c++ object "FGS" defined in HFS_API.hpp. The The FGS HFS is based on the c++ object "FGS" defined in HFS_API.hpp. The
...@@ -92,9 +92,10 @@ cnetroid packet struct with following attributes: ...@@ -92,9 +92,10 @@ cnetroid packet struct with following attributes:
102: no star inside the image 102: no star inside the image
103: star is not distinct feature 103: star is not distinct feature
104: signal is below the given threshold 104: signal is below the given threshold
105: signal sigma is below the given threshold
106: Validity index is below the given threshold 106: Validity index is below the given threshold
107: No star matched the defined signal 107: No star matched the defined signal
108: The identified star is partially cut off (Acquistion only)
109: The image is saturated
- unsigned int magnitude: magnitude of the star in ADU - unsigned int magnitude: magnitude of the star in ADU
......
...@@ -92,10 +92,8 @@ if __name__ == "__main__": ...@@ -92,10 +92,8 @@ if __name__ == "__main__":
star = star_cat.loc[star_cat['Name'] == id] star = star_cat.loc[star_cat['Name'] == id]
print("Quaternion for Star:", id) print("Quaternion for Star:", id)
star.dec = star.dec
star.ra = star.ra
star_vec = np.array((np.cos(star.dec*(np.pi/180))*np.cos(star.ra*(np.pi/180)), np.cos(star.dec*(np.pi/180))*np.sin(star.ra*(np.pi/180)), np.sin(star.dec*(np.pi/180)))) star_vec = np.array((np.cos(star["dec"]*(np.pi/180))*np.cos(star["ra"]*(np.pi/180)), np.cos(star["dec"]*(np.pi/180))*np.sin(star["ra"]*(np.pi/180)), np.sin(star["dec"]*(np.pi/180))))
sc_vec = np.array((0, 0, 1)) #target sc-vector sc_vec = np.array((0, 0, 1)) #target sc-vector
......
****************************************************** ******************************************************
* ARIEL FGS HFS Repository, ARIEL-UVIE-PL-ML-001 1.1 * * ARIEL FGS HFS Repository, ARIEL-UVIE-PL-ML-001 1.2 *
****************************************************** ******************************************************
This repository contains the HFS, the simulator SW used to simulate the This repository contains the HFS, the simulator SW used to simulate the
...@@ -19,9 +19,10 @@ Files: ...@@ -19,9 +19,10 @@ Files:
matlab_model/Example_model.slx .. Simulink example showing the bus usage matlab_model/Example_model.slx .. Simulink example showing the bus usage
test/HFSTest .................... Unit tests for the HFS library (.cpp/.hpp) test/HFSTest .................... Unit tests for the HFS library (.cpp/.hpp)
test/example.cpp ................ Example script showing the function of the library test/example.cpp ................ Example script showing the function of the library
Quaternion_Calulator.pxy ........ Python command-line tool for quaternion determination Quaternion_Calulator.py ........ Python command-line tool for quaternion determination
Star_Validation_Signals.xlsx .... Table containing target signals and validation values for stars Star_Validation_Signals.xlsx .... Table containing target signals and validation values for stars
matlab_model/Test_Cases/ ........ Simulink Test Benches used in functional verification matlab_model/Test_Cases/ ........ Simulink Test Benches used in functional verification
create_hot_pixels.py ............ Python script to create hot pixels and the corresponding calibration file
CHANGELOG CHANGELOG
README README
MANUAL MANUAL
...@@ -35,6 +36,7 @@ Dependencies: ...@@ -35,6 +36,7 @@ Dependencies:
- fftw3-devel (3.3.3) - fftw3-devel (3.3.3)
- openmpi-devel (1.10.7) - openmpi-devel (1.10.7)
- cppunit (optional, needed by unit tests) - cppunit (optional, needed by unit tests)
- clang (optional, needed for static checks)
- doxygen (optional, needed by documenation) - doxygen (optional, needed by documenation)
- plantuml (optional, needed by documentation) - plantuml (optional, needed by documentation)
- python numpy (optional, needed by Quaternion_Calulator) - python numpy (optional, needed by Quaternion_Calulator)
...@@ -55,7 +57,17 @@ Build S-Function block example: ...@@ -55,7 +57,17 @@ Build S-Function block example:
Run Quaternion_Calulator: Run Quaternion_Calulator:
> python3 Quaternion_Calulator.py TARGET_STAR_ID > python3 Quaternion_Calulator.py TARGET_STAR_ID
Run unit tests:
> make scan -f Makefile_Centos
Run test cases:
Build the HFS function block
set the time solver of the block to Fixed-step with 0.125s step size
Run the desired test case
Note that the cases use the config file in the matlab model folder
The software provided here is ©University of Vienna. The software provided here is ©University of Vienna.
GM 30th January, 2024 GM 03rd May, 2024
No preview for this file type
import numpy as np
def createDefectPixels(xDim, yDim, n, max, min, value, bias):
hp = np.ones((xDim, yDim))
ref = np.full_like(hp, bias)
for i in range(n):
x = np.random.randint(0, xDim)
y = np.random.randint(0, yDim)
hp[x, y] = np.random.uniform(min, max)
ref[x, y] = value
return hp, ref
if __name__ == "__main__":
hotPixels, Calibration = createDefectPixels(200, 200, 37, 100, 0, 0xFFFF, 1310)
np.savetxt('hotPixels_FGS1.txt', hotPixels.ravel(), fmt='%f')
np.savetxt('Calibration_FGS1.txt', Calibration.ravel(), fmt='%i')
This diff is collapsed.
This diff is collapsed.
File added
File added
File added
<HFS_MetaInfo> <HFS_MetaInfo>
<simulation_time>0.0</simulation_time>
<!-- Global timestep of the matlab simulink model. <!-- Global timestep of the matlab simulink model.
Default: 0.015625 (64Hz)--> Default: 0.0125 (680Hz)-->
<timestep>0.015625</timestep> <timestep>0.0125</timestep>
<!-- Random seed used in the noise generation --> <!-- Random seed used in the noise generation -->
<random_seed>135412</random_seed> <random_seed>135412</random_seed>
...@@ -34,12 +35,10 @@ ...@@ -34,12 +35,10 @@
second. Deefault: 1 --> second. Deefault: 1 -->
<dark_average>1</dark_average> <dark_average>1</dark_average>
<!-- The fraction of hotpixels of all sensor pixels. These <!-- The gain of the the detectors. Default: 0.655 -->
are randomly selected during the simulation. Al- <gain>0.655</gain>
lowed value range: 0.0-1.0. -->
<hotpixel_amount>0</hotpixel_amount>
<!-- The full well capacity of the detector in ADU --> <!-- The full well capacity of the detector in e-. Default: 100000 -->
<full_well_capacity>100000</full_well_capacity> <full_well_capacity>100000</full_well_capacity>
<!-- The difference threshold in ADU at which the median filter will replace <!-- The difference threshold in ADU at which the median filter will replace
...@@ -63,15 +62,15 @@ ...@@ -63,15 +62,15 @@
<!-- relative path of the Psf input files. The psfs are given as 40x40px <!-- relative path of the Psf input files. The psfs are given as 40x40px
arrays that are stored in the C array format --> arrays that are stored in the C array format -->
<FGS1_Psf>./FGS1_270nm.txt</FGS1_Psf> <FGS1_Psf>../FGS1_270nm.txt</FGS1_Psf>
<FGS2_Psf>./FGS2_270nm.txt</FGS2_Psf> <FGS2_Psf>../FGS2_270nm.txt</FGS2_Psf>
<!-- Plate scale of FGS1 in mas/px, Default: 175 --> <!-- Plate scale of FGS1 in mas/px, Default: 173 -->
<FGS1_PS>175.0</FGS1_PS> <FGS1_PS>173.0</FGS1_PS>
<!-- Plate scale of FGS2 in mas/px, Default: 136 --> <!-- Plate scale of FGS2 in mas/px, Default: 136 -->
<FGS2_PS>137.0</FGS2_PS> <FGS2_PS>136.0</FGS2_PS>
<!-- Focal length of FGS1 in m, Default: 21.21 --> <!-- Focal length of FGS1 in m, Default: 21.21 -->
<FGS1_FL>21.21</FGS1_FL> <FGS1_FL>21.21</FGS1_FL>
...@@ -110,11 +109,13 @@ ...@@ -110,11 +109,13 @@
<FWHM_FGS2_x>6</FWHM_FGS2_x> <FWHM_FGS2_x>6</FWHM_FGS2_x>
<FWHM_FGS2_y>6</FWHM_FGS2_y> <FWHM_FGS2_y>6</FWHM_FGS2_y>
<!-- Time delay causes by the mode switch in s. --> <!-- Time delay causes by the channel switch in s. -->
<transition_delay>0.5</transition_delay> <transition_delay_channel>0.5</transition_delay_channel>
<!-- End time of an ongoing transition. Used for State saving. 0 denotes no transition. Default: 0 <!-- Time delay causes by the mode switch in s. Worst Case: 2s -->
--> <transition_delay_mode>0.5</transition_delay_mode>
<!-- End time of an ongoing transition. Used for State saving. 0 denotes no transition. Default: 0 -->
<transition_end>0</transition_end> <transition_end>0</transition_end>
<!-- Target signal in ADU per second used for validation --> <!-- Target signal in ADU per second used for validation -->
...@@ -123,9 +124,6 @@ ...@@ -123,9 +124,6 @@
<!-- lower signal limit ("There is a signal" check) for centroid validation in % of target signal. defalt 1%--> <!-- lower signal limit ("There is a signal" check) for centroid validation in % of target signal. defalt 1%-->
<lower_signal_limit>1</lower_signal_limit> <lower_signal_limit>1</lower_signal_limit>
<!-- Sigma threshold in ADU used in the validation procedure -->
<validation_sigma>10</validation_sigma>
<!-- Threshold for the Pearson correlation used as the validity index. <!-- Threshold for the Pearson correlation used as the validity index.
Index can range from -1 to 1. A value of 0.5 to 0.6 serves as a Index can range from -1 to 1. A value of 0.5 to 0.6 serves as a
decent cutoff for invalid measurements--> decent cutoff for invalid measurements-->
...@@ -134,6 +132,38 @@ ...@@ -134,6 +132,38 @@
<!-- default failed status of the HFS --> <!-- default failed status of the HFS -->
<failed_status>0</failed_status> <failed_status>0</failed_status>
<!-- Ramp length in samples. Default: 100 -->
<ramp_length>100</ramp_length>
<!-- current position in the ramp. Default: 0 -->
<ramp_counter>0</ramp_counter>
<!-- Maximum ramp length. Default: 150 -->
<max_ramp>150</max_ramp>
<!-- Limit for staturated pixels in an image. At this limit, the centroid will be set invalid.
Used for the Snowball detection. Default: 5 -->
<saturation_limit>5</saturation_limit>
<!-- Calibration and hot pixel map that replaces the first sample of a ramp for FGS1 -->
<reset_calibration_FGS1>../Calibration_FGS1.txt</reset_calibration_FGS1>
<!-- Calibration and hot pixel map that replaces the first sample of a ramp for FGS2 -->
<reset_calibration_FGS2>../Calibration_FGS2.txt</reset_calibration_FGS2>
<!-- Name of the Hot and Dead Pixel input map to be used by the HFS for FGS2 -->
<hp_map_FGS1>../hotPixels_FGS1.txt</hp_map_FGS1>
<!-- Name of the Hot and Dead Pixel input map to be used by the HFS for FGS2 -->
<hp_map_FGS2>../hotPixels_FGS2.txt</hp_map_FGS2>
<!-- Noise of the reset anomaly -->
<reset_noise>10</reset_noise>
<!-- The radius of the circular field of view in arcsec. set to zero for full FoV.
Default: 22 -->
<circular_fov_radius>22</circular_fov_radius>
<!-- Configuration of the Tracking procedure --> <!-- Configuration of the Tracking procedure -->
<Tracking> <Tracking>
<!-- Iterations of the algorithm. Standard is 5 --> <!-- Iterations of the algorithm. Standard is 5 -->
...@@ -143,7 +173,7 @@ ...@@ -143,7 +173,7 @@
<!-- Toogle thresholding --> <!-- Toogle thresholding -->
<thresholding>2</thresholding> <thresholding>2</thresholding>
<!-- Delay of the centroid packet in seconds. <!-- Delay of the centroid packet in seconds.
Note: must be lower than the integration time (0.125 s) --> Note: must be lower than the integration time (0.1 s) Worst case: 20 ms -->
<delay>0.02</delay> <delay>0.02</delay>
<!-- Exposure time for mode Tracking in s, default: 0.1 --> <!-- Exposure time for mode Tracking in s, default: 0.1 -->
<exposure_time>0.1</exposure_time> <exposure_time>0.1</exposure_time>
...@@ -162,37 +192,46 @@ ...@@ -162,37 +192,46 @@
<!-- Toogle thresholding --> <!-- Toogle thresholding -->
<thresholding>2</thresholding> <thresholding>2</thresholding>
<!-- Delay of the centroid packet in seconds. <!-- Delay of the centroid packet in seconds.
Note: must be lower than the integration time (0.5 s) --> Note: must be lower than the integration time (0.5 s) Worst case: 150 ms -->
<delay>0.1</delay> <delay>0.1</delay>
<!-- Exposure time for mode Acquisition in s, default: 0.5 --> <!-- Exposure time for mode Acquisition in s, default: 0.5 -->
<exposure_time>0.5</exposure_time> <exposure_time>0.5</exposure_time>
<!-- Brightness tolerance for target identification default is 30% --> <!-- Brightness tolerance for target identification default is 30% -->
<tolerance>30</tolerance> <tolerance>30</tolerance>
<!-- Dimensiton of the Acquisition window for FGS1, default: 128px --> <!-- Dimensiton of the Acquisition window for FGS1, default: 177px -->
<FGS1_dim>128</FGS1_dim> <FGS1_dim>128</FGS1_dim>
<!-- Dimensiton of the Acquisition window for FGS2, default: 161px --> <!-- Dimensiton of the Acquisition window for FGS2, default: 177px -->
<FGS2_dim>161</FGS2_dim> <FGS2_dim>162</FGS2_dim>
<!-- Limit of brightest sources to be considered in the source extraction. Default: 25--> <!-- Limit of brightest sources to be considered in the source extraction. Default: 25-->
<target_limit>25</target_limit> <target_limit>25</target_limit>
<!-- Signal Sigma Limit for Source extent check. Default: 1000. Possible cause for 107 error if set too high--> <!-- Signal Sigma Limit for Source extent check. Default: 500. Possible cause for 107 error if set too high-->
<extension_sigma>1000</extension_sigma> <extension_sigma>500</extension_sigma>
</Acquisition> </Acquisition>
<!-- Relative path to the star catalogue --> <!-- Relative path to the star catalogue -->
<Star_catalogue>./src/Star_catalogue.csv</Star_catalogue> <Star_catalogue>../src/Star_catalogue.csv</Star_catalogue>
<!-- Flag indicating if images features shall be generated from existing files. <!-- Flag indicating if images features shall be generated from existing files.
Only applicable for saved states--> Only applicable for saved states-->
<use_saved_files>0</use_saved_files> <use_saved_files>0</use_saved_files>
<hp_map>./HP_map.txt</hp_map>
<flat>./flat_field.txt</flat> <flat>./flat_field.txt</flat>
<smear>./smear_kernel.txt</smear> <smear>./smear_kernel.txt</smear>
<ramp>./ramp_input.txt</ramp>
<previous_image>./previous_image.txt</previous_image>
<smear_x>0.0</smear_x> <smear_x>0.0</smear_x>
<smear_y>0.0</smear_y> <smear_y>0.0</smear_y>
<centroid_x>0</centroid_x>
<centroid_y>0</centroid_y>
<centroid_time>0</centroid_time>
<centroid_valid>0</centroid_valid>
<centroid_index>0</centroid_index>
<centroid_mag>0</centroid_mag>
<centroid_send>0</centroid_send>
</HFS_MetaInfo> </HFS_MetaInfo>
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment