Giter Club home page Giter Club logo

ezra's Introduction

ezRA - Easy Radio Astronomy

ezRA_logo

The ezRA Easy Radio Astronomy set of programs are free PC tools to help folks beginning to explore Radio Astronomy, with 1420 MHz Galactic hydrogen data collection and analysis. The open source programs run on the Python3 programming language, on Windows and Linux.

The ezRA set of programs are still in development, but mostly work well.

Interested folks on GitHub would left-click on the top right Green "Code" button and probably choose "Download ZIP" (about 30 MBytes, probably as "ezRA-master.zip" into your local "Downloads" directory). Then start exploring the many PDF files in your ezRA/doc directory. Also the videos listed below.

=============================================

ezRA documentation has many images. Rather than duplicate those image bytes here in an online README.md file, please see these introductory PDFs from the ezRA directory:

Or perhaps start with these 2 introductory videos (from the longer list of videos below):

=============================================

There are 6 major ezRA programs:

  • ezCol - COLlect radio signals into integrated frequency spectrum ezRA .txt data files.

    • Or convert previous radio data with ezColBAA, ezColHay, ezColIFAvg, ezColSc, etc.

    • ezFix - remove or separate samples, combine, edit, and split frequency spectrum ezRA .txt data files.

  • ezCon - CONdense one or more frequency spectrum data .txt files into one .ezb text data file, and perhaps one Galaxy crossing spectra *Gal.npz data file.

  • ezPlot - PLOT analysis from one or more .ezb condensed data files.

  • ezSky - SKY maps from one or more .ezb condensed data files.

  • ezGal - GALaxy plots from one or more spectra *Gal.npz data files (centered on one Galactic Latitude: Galaxy rotation, Galaxy mass, Velocity vs Galactic Longitude, Galaxy arm plots).

  • ezGLon - Galaxy LONgitude plots from one or more spectra *GLon.npz data files (centered on one Galactic Longitude: Galaxy arm cross-section plots).

Videos:

https://www.youtube.com/@TedCline/videos



Society of Amateur Radio Astronomers (SARA) https://www.youtube.com/@radio-astronomy

Documentation for ezRA, in the ezRA/doc directory, will eventually include:

  • ezRA_00_Introduction.pdf
  • ezRA_01_Tour.pdf
  • ezRA_05_Demonstration.pdf

  • ezRA_10_Hardware_1.pdf
  • ezRA_11_Hardware_2.pdf

  • ezRA_20a_Software.pdf
  • ezRA_20b_Windows_Install.pdf
  • ezRA_20c_Linux_Install.pdf
  • ezRA_21a_ezCol.pdf
    • ezRA_21d_ezColBAA.pdf
    • ezRA_21c_ezColHay.pdf
    • ezRA_21b_ezColIFAvg.pdf
    • ezRA_21e_ezColSC.pdf
    • ezRA_21y_ezRename.pdf
    • ezRA_21z_ezFix.pdf
  • ezRA_22_ezCon.pdf
  • ezRA_23_ezPlot.pdf
  • ezRA_24_ezSky.pdf
  • ezRA_25_ezGal.pdf
  • ezRA_26_ezGLon.pdf

Status:

  • ezSky's ezSkyXYLimL allows zoomed interpolated plots of the sky.
  • ezCol and ezCon now support RaDec and Galactic sky tracking (but no motor control).
  • ezCon's default is now the faster "-ezConAstroMath 1".

Thanks to Todd Ullery, the ezColX.py was an experimental multiple process version of ezCol.py , to improve dashboard responsiveness.
The experiment has completed successfully, ezColX is now named ezCol, and the name ezColX is retired.

These data converter programs need lots of cleanup, but should work or be helpful:

  • ezColBAA.py
  • ezColHay.py
  • ezColIFAvg.py
  • ezColSc.py

Always need more documentation.

--

Did ezRA work for you ?

ezRA_users240616

Comments are encouraged !

Help improve ezRA.

--

[email protected]
Jun-16-2024

(World Map by juicy_fish on Freepik.com)


ezra's People

Contributors

tedcline avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ezra's Issues

ezColAntBtwnRef in defaults file causes ezCol.py crash

Setup

  • Latest ezRA, pulled 10/23/2023
  • Raspberry Pi 4 with Raspbian bullseye, fresh install
  • Python 3.9.2
  • Have -ezColAntBtwnRef 10 in my 1m-defaults.txt file (see contents below)

Error

Run command 'ezCol.py -ezDefaultsFile /home/nathan/astro/1m-defaults.txt' and I get the error:

========== FATAL ERROR:  Defaults file ( /home/nathan/astro/1m-defaults.txt )
 has this line's unrecognized first word:
-ezColAntBtwnRef  10             #(number of Ant samples between Ref samples)

Contents of 1m-defaults.txt:

# Pointing setup
-ezColAzimuth   180.0            #(Azimuth   pointing of antenna (degrees))
-ezColElevation  45.0            #(Elevation pointing of antenna (degrees))

# Observatory information
-ezRAObsLat  36.93083            #(Observatory Latitude  (degrees))
-ezRAObsLon  -86.43167           #(Observatory Longitude (degrees))
-ezRAObsAmsl 170.7               #(Observatory Above Mean Sea Level (meters))
-ezRAObsName sokyrad_1m          #(Observatory Name)
-ezColFileNamePrefix sokyrad-1m_ #(Data File Name Prefix)

# H1 observation setup
-ezColCenterFreqAnt 1420.405     #(Signal          Frequency (MHz))
-ezColCenterFreqRef 1423.405     #(Dicke Reference Frequency (MHz))
-ezColBandWidth        2.400     #(Signal          Bandwidth (MHz))
-ezColFreqBinQtyBits   8         #(For  (2^8) 256 freqBinQty frequencies)
-ezColGain        9999           #(Use max gain)
-ezColAntBtwnRef  10             #(number of Ant samples between Ref samples)
#-ezColUsbRelay   11              #(1 SPST HID relay,     driving feedRef ON or OFF)

# Output setup
-ezColVerbose     1             #(Turn on Verbose mode)
-ezColDashboard   1             #(Turn off graphical display)
-ezColDispGrid    1             #(Turn on graphical display plot grids)

Adding -ezColAntBtwnRef 10 to my ezCol.py command line and commenting out the -ezColAntBtwnRef line starts ezCol as expected . Was able to replicate the error by changing back to original defaults file and command.

I went through ezCol.py to see if there was an error with retrieving the command from the defaults file but it seemed to be formatted correctly.

ezCol.py crash during 37 plotting ezCon088antBTVTByFreqBinAllFall.png

Hi Ted,

Had a crash trying to use for the first time ezCon.py to process a 2 hours acquisition test.
If necessary, I can provide the full output log or the input file.

Setup

Acquisition :
Host: Intel D945GSEJT Intel Atom(TM) CPU N270 @ 1.60GHz
OS : Debian BunsenLab 6.1.85-1 (2024-04-11) i686 GNU/Linux
Kernel: 6.1.0-20-686-pae
SDR : Realtek RTL2838 DVB-T
Python v3.11.2
using programRevision = ezCol231211a.py

Processing :
OS: Windows 10 x64 22H2 Build 19045.4412
Python v3.8.10
using programRevision = ezCon240108a.py

Commands

Failed when using commands:
python ../ezRA/ezCon.py data/ObsStJean240524_19.txt

Input data

.\data/ObsStJean240524_19.txt
   dataAzimuth   =  180.0
   dataElevation =  42.0

 file = 0 of 1 in dir 1 of 1 = .\data/ObsStJean240524_19.txt samplesRead= 1   fileRawLen= 1   rawLen= 1   antLen ?= 1     
 [...]        
 file = 0 of 1 in dir 1 of 1 = .\data/ObsStJean240524_19.txt samplesRead= 83   fileRawLen= 83   rawLen= 83   antLen ?= 83             
                                                                                                                                                              
                         Total           samples read   = 83
                         Total reference samples read   = 0

   ezConAntXInput changed to 4 for AntB

Output on Failure

  data/ObsStJean240524_19.txt  37 plotting ezCon088antBTVTByFreqBinAllFall.png ================================
Traceback (most recent call last):
  File "../ezRA/ezCon.py", line 10345, in <module>
    main()
  File "../ezRA/ezCon.py", line 10259, in main
    plotEzCon088antXTVTByFreqBinAllFall()
  File "../ezRA/ezCon.py", line 5976, in plotEzCon088antXTVTByFreqBinAllFall
    antXTVTD[:, n] = np.mean(antXTVT[:, downsamplingIndex:downsamplingIndex+downsamplingStep], axis=1)
IndexError: index 83 is out of bounds for axis 1 with size 83

ezCon240108a Errors with ezConAstroMath = 2

ezCon240108a Errors with ezConAstroMath = 2

Howdy Ted,

Had a strange error pop up trying to use ezConAstroMath = 2. I didn't do any digging into the code yet as I found this on my lunch break, but wanted to make you aware.

Setup

System

ezcon is aliased to ~/bin/ezRA/ezRA/ezCon.py
using programRevision = ezCon240108a.py

OS: Linux Mint 21.2 x86_64
Host: OptiPlex 3050
Kernel: 5.15.0-91-generic
Shell: bash 5.1.16
DE: Cinnamon 5.8.4

Commands

Failed when using commands:

ezcon . -ezConAstroMath 2
ezcon . -ezConAstroMath 2 -ezConGalCrossingGLonCenterL -154 -149 6 -ezConGalCrossingGLonCenterL 35 40 6
ezcon sokyrad-1m_240126_00.txt -ezConAstroMath 2

Passes when using commands:

ezcon . -ezConGalCrossingGLonCenterL -154 -149 6 -ezConGalCrossingGLonCenterL 35 40 6
ezcon sokyrad-1m_240126_00.txt -ezConAstroMath 1

Output on Failure

sokyrad-1m_240130_00.txt  43 plotting ezCon382antRBTByFreqBinAvgRfi.png ================================

   createEzConOutEzb ===============
                         ezConAstroMath = 2
Traceback (most recent call last):
  File "/home/nathan/bin/ezRA/ezRA/ezCon.py", line 10345, in <module>
    main()
  File "/home/nathan/bin/ezRA/ezRA/ezCon.py", line 10226, in main
    createEzConOutEzb()                 # using ezConAstroMath, creates partial ezConOut,
  File "/home/nathan/bin/ezRA/ezRA/ezCon.py", line 4363, in createEzConOutEzb
    vStarEarthAroundSun = -float(pointingTelescope.radial_velocity_correction(kind='barycentric') / (1000. * u.m / u.s))   # into km/s
  File "/usr/lib/python3/dist-packages/astropy/coordinates/sky_coordinate.py", line 1942, in radial_velocity_correction
    gcrs_p, gcrs_v = location.get_gcrs_posvel(obstime)
  File "/usr/lib/python3/dist-packages/astropy/coordinates/earth.py", line 734, in get_gcrs_posvel
    return self._get_gcrs_posvel(obstime,
  File "/usr/lib/python3/dist-packages/astropy/coordinates/earth.py", line 708, in _get_gcrs_posvel
    pos = itrs_cart.transform(itrs_to_gcrs)
  File "/usr/lib/python3/dist-packages/astropy/coordinates/representation.py", line 1402, in transform
    p = erfa_ufunc.rxp(matrix, self.get_xyz(xyz_axis=-1))
  File "/usr/lib/python3/dist-packages/astropy/coordinates/representation.py", line 1354, in get_xyz
    return np.stack([self._x, self._y, self._z], axis=xyz_axis)
  File "/usr/lib/python3/dist-packages/astropy/units/quantity.py", line 1696, in __array_function__
    return super().__array_function__(function, types, args, kwargs)
  File "/home/nathan/.local/lib/python3.10/site-packages/numpy/core/shape_base.py", line 456, in stack
    return _nx.concatenate(expanded_arrays, axis=axis, out=out,
  File "/usr/lib/python3/dist-packages/astropy/units/quantity.py", line 1701, in __array_function__
    args, kwargs, unit, out = function_helper(*args, **kwargs)
TypeError: concatenate() got an unexpected keyword argument 'dtype'

Improvement - ezRA_20c_Linux_Install.pdf Needs Updates

ezRA Linux Install Updates Needed

Issue

Some distros, especially Debian based, have updated their Python package policies. It might be for all Python after a certain version, not really sure. A lot of packages now cannot be installed with pip3 install <package>, but instead need to be pulled from the repo for the distribution.

Solution

Modify instructions to include the alternative method:

pip3 install seaborn is installed now by sudo apt install python3-seaborn

pip3 install astropy is installed now by sudo apt install python3-astropy

pip3 install scipy is installed now by sudo apt install python3-scipy

pyrtlsdr does not have a python3-pyrtlsdr, so I installed with pip3 install pyrtlsdr --break-system-packages. I believe, however, if you were doing this in a virtual environment, you may not have to do this. I write stuff in stone.....

ezCol.py crash while searching for un unknown ezConStudy./data/ directory

Hi Ted,

Had a strange error pop up trying to use for the first time ezCon.py to process a 2 hours acquisition test.
Had to create manualy a 'ezConStudydata' directory at the same level of my 'data' directory to overcome the error.
Seems to be a misunderstanding between my pathname and the way it is used by the script.

Setup

Processing :
OS: Windows 10 x64 22H2 Build 19045.4412
Python v3.8.10
using programRevision = ezCon240108a.py

Commands

Failed when using command:
python ../ezRA/ezCon.py ./data/ObsStJean240524_19.txt

Output on Failure

   openFileStudy ===============
   opening ezConStudy./data/ObsStJean240524_19.txt
Traceback (most recent call last):
  File "../ezRA/ezCon.py", line 10345, in <module>
    main()
  File "../ezRA/ezCon.py", line 9982, in main
    openFileStudy()         # In case it will eventually error.  Creates fileWriteNameStudy, fileWriteStudy
  File "../ezRA/ezCon.py", line 1857, in openFileStudy
    fileWriteStudy = open(fileWriteNameStudy, 'w')
FileNotFoundError: [Errno 2] No such file or directory: 'ezConStudy./data/ObsStJean240524_19.txt'

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.