Coder Social home page Coder Social logo

nicolegrillo / stripnoisechar Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 45 KB

Noise characterisation of the LSPE-Strip instrument for my bachelor thesis project (Unimi, winter 2022).

Python 100.00%
fourier-analysis fourier-series fourier-transform lspe noise python

stripnoisechar's Introduction

StripNoiseChar

Strip polarimeters noise analysis and characterization for my thesis project (winter 2022). This repository works as a storage for the functions and scripts I developed to find some useful noise characterization parameters.

Noise characterization

The Python script noise_evaluation.py finds the optimal parameters for the noise curve in the Fourier space, with two different methods. It returns a report file complete with data graphs and printed results via the template file noise_char_report.txt.

Input arguments required:

  • Data path to .HDF5 files;
  • Date string in .iso format;
  • Polarimeter to which refer the "STABLE_ACQUISITION" tag;
  • Results path where to save the report;
  • Data type (PWR or DEM).

Noise characterization - JSON

The Python script noise_evaluation_JSON.py finds the optimal parameters for the noise curve in the Fourier space, with two different methods. It returns a .json file with the parameters for future analysis.

Input arguments required:

  • Data path to .HDF5 files;
  • Date string in .iso format;
  • Polarimeter to which refer the "STABLE_ACQUISITION" tag;
  • Results path where to save the report;
  • Data type (PWR or DEM).

Example 1

To operate the analysis on data that was acquired from 14/12/2022 at 16:30:00 to 15/12/2022 at 11:30:00, this is what you would run:

`./noise_evaluation.py /Users/nicolegrillo/Desktop/Tesi/Test_data/ "2022-12-14 14:30:01" "2022-12-15 13:30:01" R6 ~/data_analysis/complete_noise_interpolation/14-12-2022/R6 DEM`

where /Users/nicolegrillo/Desktop/Tesi/Test_data/ and ~/data_analysis/complete_noise_interpolation/14-12-2022/R6 are respectively the data path and the results path in my computer.

Example 2 (JSON)

To operate the analysis on data that was acquired from 14/12/2022 at 16:30:00 to 15/12/2022 at 11:30:00, this is what you would run:

`./noise_evaluation_JSON.py /Users/nicolegrillo/Desktop/Tesi/Test_data/ "2022-12-14 14:30:01" "2022-12-15 13:30:01" R6 ~/data_analysis/complete_noise_interpolation/14-12-2022/R6 DEM`

where /Users/nicolegrillo/Desktop/Tesi/Test_data/ and ~/data_analysis/complete_noise_interpolation/14-12-2022/R6 are respectively the data path and the results path in my computer.

Comparison of knee frequency results

The Python script error_data_plots.py returns a single plot that shows the two f_knee parameter results obtained with the two different methods (interpolation and delta). The plot is referred to a specific board specified by the user when running the script.

Input arguments required:

  • Data path to .HDF5 files;
  • Date string in .iso format;
  • Polarimeter to which refer the "STABLE_ACQUISITION" tag;
  • Results path where to save the report;
  • Data type (PWR or DEM).

The script then asks the user to specify which of the board to analyze, with respect to the previously specified tag. The boards from which to choose are: B, G, I, O, R, V, W, Y. If the user chooses a non-existing board the script returns the values for W as default.

Example

To return the plot on data that was acquired from 14/12/2022 at 16:30:00 to 15/12/2022 at 11:30:00, this is what you would run:

`./error_data_plots.py /Users/nicolegrillo/Desktop/Tesi/Test_data/ "2022-12-14 16:30:25" "2022-12-15 11:30:24" R6 ~/data_analysis/f_knee_error_plot/R6 DEM`

where /Users/nicolegrillo/Desktop/Tesi/Test_data/ and ~/data_analysis/f_knee_error_plot/14-12-2022/R6 are respectively the data path and the results path in my computer.

Cross correlation

The Python script cross_correlation.py computes the cross correlation of data referred to Q1,Q2 and U1,U2 paired detectors. For each polarimeter it returns the plot showing the cross power spectral density (CPSD).

Input arguments required:

  • Data path to .HDF5 files;
  • Date string in .iso format;
  • Polarimeter to which refer the "STABLE_ACQUISITION" tag;
  • Results path where to save the report;
  • Data type (PWR or DEM).

Example

To return the plots on data that was acquired from 14/12/2022 at 16:30:00 to 15/12/2022 at 11:30:00, this is what you would run:

`./cross_correlation.py /Users/nicolegrillo/Desktop/Tesi/Test_data/ "2022-12-14 16:30:25" "2022-12-15 11:30:24" R6 ~/data_analysis/cross_correlation/14-12-22/R6 DEM`

where, again, /Users/nicolegrillo/Desktop/Tesi/Test_data/ and ~/data_analysis/cross_correlation/14-12-2022/R6 are respectively the data path and the results path in my computer.

stripnoisechar's People

Contributors

nicolegrillo avatar

Stargazers

Francesco Andreetto avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.