Skip to content

Commit

Permalink
Update README.md links to steps README
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoldon authored Nov 30, 2023
1 parent a8fa3a1 commit 74b99f3
Showing 1 changed file with 11 additions and 30 deletions.
41 changes: 11 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,43 +56,18 @@ We apply the sextractor software separately to each of the images in the data cu

Once we obtained the catalog using Sextractor, we proceeded to train a convolutional network to improve the representation of the point sources. We took sources of a size of 8x8 pixels, using as centers the points that Sextractor had inferred. The goal was to optimize the identification and classification of point sources in the images. With the network trained, we generated a data cube where each pixel was assigned a probability based on the presence of a point source. Subsequently, we applied a threshold to these probabilities to classify and locate the found point sources. This modified and optimized data cube was then used as a mask, allowing us to analyze regions of interest with minimal interference from unwanted point sources or background noise.

More details about the `create_mask` step can be found in the [README](workflow/create_mask/README.md).

### 2.1. polynomial_fit

This step is an alternative to pca_subtraction.
This script applies a polynomial fit to the real and imaginary parts of the fast Fourier transform (FFT) of the images, which are in FITS format and have 901 channels (106 MHz to 196 MHz with 0.1MHz channel width) and 2048x2048 pixels each.
It also performs foreground removal and image reconstruction.

#### Requirements

Python 3.6 or higher

numpy

astropy

#### Usage
Usage
```bash
python PolyFit.py <input_file> <output_file> <degree> <log>
```
where:

`<input_file>` is the name of the FITS file containing the image cube
It also performs foreground removal and image reconstruction.

`<output_file>` is the name of the FITS file where the reconstructed image cube will be saved
More details about the `polynomial_fit` step can be found in the [README](workflow/polynomial_fit/README.md).

`<degree>` is the degree of the polynomial to fit to the FFT
Output

`<log>` is a boolean flag indicating whether to use log-log space (True) or linear space (False) for the polynomial fit

#### Example
```bash
python Polyfit.py ZW3.image_cube.fits /home/user/results/ 3 True
```

This will apply a third-degree polynomial fit to the FFT of each pixel in log-log space, remove the foregrounds, and save the output files to /home/user .

#### Output
The script will generate several temporary files to save RAM memory. These files will be removed at the end.
The script will save each slice of the reconstructed cube to a FITS file into the directory specified by the user.
Output filenames follow the pattern `data_clean_i.fits`, where `i` represents the channel number and ranges from 1 to 901.
Expand Down Expand Up @@ -125,6 +100,9 @@ Subtracting the 4-component PCA image to the original image, the residual would

The output of this step is a frequency-binned cube, in which the full frequency range of 90 MHz is divided into 15 MHz intervals required for the power spectrum estimation.

More details about the `pca_substraction` step can be found in the [README](workflow/pca_substraction/README.md).


### 3. power_spectrum

The power spectrum allows us to study the distribution of fluctuations of the EoR signal at different scales (spatial or spectral). The HI signal from the EoR evolves with the frequency, i.e. with the redshift; yet, it can be considered isotropic at small frequency bins. Instrumental and foreground effects also evolve with the frequency but cannot be considered isotropic. For this reason, the cylindrical 2D power spectrum is used to analyse and correct line of sight effects while the spherical power spectrum is used for clean EoR signal. For more information see e.g. [1,2,3,4,5]
Expand All @@ -137,6 +115,9 @@ This step estimates the cylindrical power spectrum and its errors from 3D FITS i
[4] Joshua S. Dillon et al 2014 Phys. Rev. D 89, 023002<br>
[5] Liu, A. and Tegmark, M., “A method for 21 cm power spectrum estimation in the presence of foregrounds”, <i>Physical Review D</i>, vol. 83, no. 10, 2011. doi:10.1103/PhysRevD.83.103006.<br>

More details about the `power_spectrum` step can be found in the [README](workflow/power_spectrum/README.md).


## File structure
This is the structure of the workflow directory

Expand Down

0 comments on commit 74b99f3

Please sign in to comment.