Skip to content

Commit

Permalink
remove dt, update readme, close #16
Browse files Browse the repository at this point in the history
  • Loading branch information
mef51 committed Feb 10, 2023
1 parent d0e3845 commit ba87341
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The GUI is extensible and pull requests are welcome.

## Status

Currently Frbgui works best with waterfalls saved as 2d numpy arrays (See [Usage](#usage) for more details). Frbgui works but is quirky, buggy, and not tested on different platforms. Frbgui will run on any platform but with varying performance.
Currently Frbgui works best with waterfalls saved as 2d numpy arrays (See [Usage](#usage) for more details). Frbgui is functional and can produce thousands of measurements but is quirky, buggy, and not tested on different platforms. Frbgui will run on any platform but with varying performance.

## Installation

Expand Down Expand Up @@ -43,27 +43,28 @@ At the moment frbgui works best with burst waterfalls that are prepared as pytho
```python
wfall = # 2D numpy array with shape (num freq channels, num time channels)
burstmetadata = {
'dt' : # array of time axis, unused, optional,
'dfs' : # array of frequency channels in MHz,
'DM' : # float of dispersion measure (DM),
'bandwidth' : # float of bandwidth in MHz,
'duration' : # burst duration in seconds
'center_f' : # burst frequency in MHz, unused, optional,
'duration' : # duration of `wfall` in seconds
'center_f' : # burst frequency in MHz, optional,
'freq_unit' : # string of freqeuncy unit, e.g. 'MHz', optional,
'time_unit' : # string of time unit, e.g. 'ms', optional,
'int_unit' : # string of intensity unit, e.g. 'Jy', optional,
'telescope' : # string of observing telescope, e.g. 'Arecibo', optional,
'burstSN' : # float of signal to noise ratio, optional,
'tbin' : # float of time resolution, unused, optional
'tbin' : # float of time resolution, optional
}

np.savez('burst.npz', wfall=wfall, **burstmetadata)
```

Optional fields are used for display purposes and do not otherwise affect measurements from within `frbgui`.

## Acknowledgements

If used in an academic study please cite
If used in an academic study please cite

"A broad survey of spectro-temporal properties from FRB20121102A", Chamma, Mohammed A. ; Rajabi, Fereshteh ; Kumar, Aishwarya ; Houde, Martin. Oct. 4 2022. Submitted to MNRAS.
[arxiv:2210.00106](https://arxiv.org/abs/2210.00106),
[arxiv:2210.00106](https://arxiv.org/abs/2210.00106),
[ADS:2022arXiv221000106C](https://ui.adsabs.harvard.edu/abs/2022arXiv221000106C/abstract)
5 changes: 3 additions & 2 deletions frbgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,14 @@ def updatedata_cb(sender, data):
gdata['burstmeta']['fres'] = df
dpg.set_value('df', df)
dpg.configure_item('df', format='%.{}f'.format(getscale(df)+1))
elif key == 'dt':
elif key == 'duration' or key == 'dt':
dt = loaded['duration'] / storedshape[1]*1000
# print(dt, loaded['duration'], storedshape[1]*1000)
gdata['burstmeta']['duration'] = loaded['duration']
gdata['burstmeta']['tres_original'] = dt
gdata['burstmeta']['tres'] = dt
dpg.set_value('dt', dt)
dpg.set_value('duration', loaded['duration'])
dpg.configure_item(key, format='%.{}f'.format(getscale(dt)+3))
else:
dpg.set_value(key, loaded[key]) # this line sets all the burst fields
Expand Down Expand Up @@ -1411,7 +1412,7 @@ def frbgui(filefilter=gdata['globfilter'],

# dpg.show_documentation()
dpg.set_main_window_size(winwidth, winheight)
dpg.set_main_window_title("FRB Repeaters")
dpg.set_main_window_title("frbgui")
# dpg.start_dearpygui()

# Load defaults
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def readme():

setuptools.setup(
name="frbgui",
version="0.91",
version="0.9.2",
author="Mohammed Chamma",
author_email="mchamma@uwo.ca",
description="GUI and utilities for processing Fast Radio Burst waterfalls",
Expand Down

0 comments on commit ba87341

Please sign in to comment.