Skip to content

Commit cd86900

Browse files
authored
Merge pull request #10 from AUAS-Pulsar/readme
Readme
2 parents 2f4e510 + 48c6fb5 commit cd86900

File tree

3 files changed

+64
-18
lines changed

3 files changed

+64
-18
lines changed

README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,17 @@
77

88
Creating a free and open source framework that contains the generic algorithms and file handling for astronomical data sets. This framework will be modular. Similar to OpenCV, wherein specific modules can be added and disabled depended on the needs of a project. This framework will be implemented in Python and C++.
99

10-
## Installation
11-
12-
### Requirements
10+
## Requirements
1311

1412
* numpy
1513
* python 3.6
1614

17-
18-
## Documentation
19-
Will be added later.
20-
21-
## How to use this library
22-
23-
### Read header data
24-
25-
1. Specify the path to the filterbank file in the header.py file (line 124)
26-
2. Run the following command: `python header.py`
27-
28-
# Asteria
15+
# Table of contents
16+
1. [Getting started](docs/gettingstarted.md)
17+
1. [Example filterbank files](docs/gettingstarted.md#11-example-filterbank-files)
18+
2. [Import](docs/gettingstarted.md#12-import)
19+
2. [Filterbank tutorial](docs/filterbank.md)
20+
1. [Create filterbank object](docs/filterbank.md#21-create-filterbank-object)
21+
2. [Read header from filterbank data](docs/filterbank.md#22-read-header-from-filterbank-data)
22+
3. [Read filterbank file to 3d numpy array](docs/filterbank.md#23-read-filterbank-file-to-3d-numpy-array)
23+
4. [Select a range of data from the filterbank file](docs/filterbank.md#24-select-a-range-of-data-from-the-filterbank-file)

docs/filterbank.md

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
1-
# Filterbank (INOP)
1+
# 2. Filterbank Tutorial
22

3-
This document will give you info regarding the filterbank data.
3+
### 2.1 Create a filterbank object
4+
```
5+
filterbank = Filterbank(<PATH TO FILTERBANK FILE>)
6+
```
7+
This is an example without parameters, see 2.3 for an example with the parameters.
8+
### 2.2 Read the header from filterbank data
9+
```
10+
filterbank.header
11+
```
412

5-
//ToDo Add info..
13+
Header data contains the following:
14+
```
15+
* source_name
16+
* DM
17+
* machine_id
18+
* telescope_id
19+
* data_type
20+
* fch1
21+
* foff
22+
* nchans
23+
* nbits
24+
* tstart
25+
* tsamp
26+
* nifs
27+
```
28+
freq_range = fch1 + nchans
29+
time_range = tstart + (tsamp/24/60/60)
30+
31+
freq_range is a tuple with a frequency start and a frequency stop
32+
The same applies to time_range
33+
34+
### 2.3 Read filterbank file to 3d numpy array
35+
The attributes time_range and freq_range can be passed as parameters to select a specific portion of the filterbank file, for example:
36+
```
37+
filterbank = Filterbank(<PATH TO FILTERBANK FILE>, freq_range, time_range)
38+
```
39+
40+
### 2.4 Select a range of data from the filterbank file
41+
The select_data method can be used to select a subset from the data read by the read_filterbank method.
42+
```
43+
filterbank.select_data(freq_range, time_range)
44+
```

docs/gettingstarted.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 1. Getting started
2+
3+
## 1.1 Example filterbank files
4+
### Use one of the following filterbank files as an example:
5+
* <a href="https://git.dev.ti-more.net/uploads/-/system/personal_snippet/2/bc063035797e978034adfb6f2da75e70/pspm8.fil">8 bit</a>
6+
* <a href="https://git.dev.ti-more.net/uploads/-/system/personal_snippet/2/3da35656df8f722441579847974a03cb/pspm16.fil">16 bit</a>
7+
* <a href="https://git.dev.ti-more.net/uploads/-/system/personal_snippet/2/e6015ec024ad1f53d4c2f39511620db1/pspm32.fil">32 bit</a>
8+
9+
## 1.2 Import
10+
```
11+
from filterbank.filterbank import *
12+
```

0 commit comments

Comments
 (0)