Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
add docs
  • Loading branch information
7andahalf committed Aug 9, 2018
1 parent e4a946e commit f772e26
Show file tree
Hide file tree
Showing 19 changed files with 624 additions and 51 deletions.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/_build/doctrees/gettingstarted.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/modules.doctree
Binary file not shown.
70 changes: 57 additions & 13 deletions docs/_build/html/_modules/directdemod/decode_funcube.html

Large diffs are not rendered by default.

106 changes: 77 additions & 29 deletions docs/_build/html/_modules/directdemod/decode_meteorm2.html

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/_build/html/_modules/directdemod/source.html
Expand Up @@ -99,6 +99,7 @@ <h1>Source code for directdemod.source</h1><div class="highlight"><pre>
<span class="sd"> &#39;&#39;&#39;</span>

<span class="bp">self</span><span class="o">.</span><span class="n">__offset</span> <span class="o">=</span> <span class="mi">0</span>
<span class="bp">self</span><span class="o">.</span><span class="n">memmap</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">memmap</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">offset</span><span class="o">=</span><span class="mi">44</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">__sourceType</span> <span class="o">=</span> <span class="n">constants</span><span class="o">.</span><span class="n">SOURCE_IQWAV</span>
<span class="bp">self</span><span class="o">.</span><span class="n">__sampFreq</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">__data</span> <span class="o">=</span> <span class="n">scipy</span><span class="o">.</span><span class="n">io</span><span class="o">.</span><span class="n">wavfile</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="kc">True</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">givenSampFreq</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
Expand Down Expand Up @@ -190,6 +191,7 @@ <h1>Source code for directdemod.source</h1><div class="highlight"><pre>

<span class="bp">self</span><span class="o">.</span><span class="n">__offset</span> <span class="o">=</span> <span class="mi">0</span>
<span class="bp">self</span><span class="o">.</span><span class="n">__sourceType</span> <span class="o">=</span> <span class="n">constants</span><span class="o">.</span><span class="n">SOURCE_IQDAT</span>
<span class="bp">self</span><span class="o">.</span><span class="n">memmap</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">memmap</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">__data</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">memmap</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">__length</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__data</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">__sampFreq</span> <span class="o">=</span> <span class="n">constants</span><span class="o">.</span><span class="n">IQ_SDRSAMPRATE</span>
Expand Down Expand Up @@ -284,6 +286,7 @@ <h1>Source code for directdemod.source</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">__offset</span> <span class="o">=</span> <span class="mi">0</span>
<span class="bp">self</span><span class="o">.</span><span class="n">__sourceType</span> <span class="o">=</span> <span class="n">constants</span><span class="o">.</span><span class="n">SOURCE_IQWAV</span>
<span class="bp">self</span><span class="o">.</span><span class="n">__data</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">memmap</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">offset</span><span class="o">=</span><span class="mi">44</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">memmap</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">memmap</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">offset</span><span class="o">=</span><span class="mi">44</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">__length</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__data</span><span class="p">)</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">__sampFreq</span> <span class="o">=</span> <span class="n">constants</span><span class="o">.</span><span class="n">IQ_SDRSAMPRATE</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">givenSampFreq</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
Expand Down
74 changes: 74 additions & 0 deletions docs/_build/html/_sources/gettingstarted.rst.txt
@@ -0,0 +1,74 @@
.. DirectDemod documentation master file, created by
sphinx-quickstart on Thu May 17 00:16:36 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
DirectDemod: Getting Started
===================================

Installation
-----------------------
DirectDemod is written in python3 and uses the following libraries:

Mandatory:

* scipy

* numpy

* matplotlib

* PIL

* colorsys

Optional: (Only used for map overlay for NOAA images)

* pyorbital

* Basemap

* cartopy

Please make sure you have all the mandatory libraries installed.

Clone the repo into a folder and run "python main.py". If you get a usage statement, you are good to go. The usage statement has all the commands that can be given to the program.

Specific applications
-----------------------

Following are the application specific guides. Assuming you already know how to record RTLSDR data to a .wav or a .dat file.

To decode NOAA image
-----------------------

If you want to decode a NOAA IQ data into images you can run the command:

python main.py -c 137000000 -f 137100000 -d noaa "file.wav"

here 13700000 is the centre frequency of the input file. 137100000 is the frequency of the satellite. "-d noaa" tells the program to use a noaa decoder on this. You should change these to match the file you have. When you run this, it will continuously print the status of decoding.

If you are skeptical if these settings are right and just want to test a portion of your file you can use the -s and -e options. For example if I want to just decode the file from 1000000 sample number to 2000000 sample number I can use the command,

python main.py -c 137000000 -f 137100000 -s 1000000 -e 2000000 -d noaa "file.wav"

This is especially helpful to just do a small test run to make sure it has found the signal.

This will just generate a black and white image, and a color image if right channels are detected. You can have a look at other commands from the usage statement.

In case the signal is not found or is very noisy you can do the following trouble shooting:

* sometimes I and Q channels migt be swapped, so use the -q flag to try to un-swap and try decoding.
e.g. python main.py -c 137000000 -f 137100000 -q -d noaa "file.wav"

* If the signal is very noisy, you can play around with the bandwidth of the main filter by using the -b option
e.g. python main.py -c 137000000 -f 137100000 -b 1000000 -d noaa "file.wav"

* Try opening the file in a gui like SDRSHARP and make sure you can see and hear the characteristic NOAA waterfall. Note down the frequency and make sure you are providing accurate inputs to the program.

To get sync locations in IQ recordings
--------------------------------------------
Currently the program has implementations of NOAA, Meteor M2 and Funcube (similar cubesats) so that accurate sync locations within the file could be found.

Similar to NOAA image extraction, if you provide the flag -sync, the program will generate a .csv file with the corresponding sync locations.
For Funcube or Meteor satellites, the process is similar, but no need to pass -sync flag, the .csv file will be automatically generated.
6 changes: 6 additions & 0 deletions docs/_build/html/_sources/index.rst.txt
Expand Up @@ -6,10 +6,16 @@
Welcome to DirectDemod's documentation!
=======================================

DirectDemod is a set of python libraries that allow for easy handling, demodulation and decoding of raw IQ.wav (or IQ.dat) files directly captured from RTLSDRs. All the tools such as file readers, filters, chunking etc. are implemented and can be used as per the user's needs. Currently application specific demodulators are implemented for NOAA satellites (Image and sync detection), Funcube (similar cubesats) and Meteor M2 satellite (sync detection).

To get started on directly using this software for decoding: NOAA or demodulating: funcubes or meteor m2 satellites, look at the getting started guide.
Some tutorials on how to use the modules and write your own scripts or to extend existing libraries, can be found at the tutorial folder in the repo.

.. toctree::
:maxdepth: 2
:caption: Contents:

gettingstarted.rst
modules.rst


Expand Down
169 changes: 169 additions & 0 deletions docs/_build/html/gettingstarted.html
@@ -0,0 +1,169 @@

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DirectDemod: Getting Started &#8212; DirectDemod documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="DirectDemod: Modules documentation" href="modules.html" />
<link rel="prev" title="Welcome to DirectDemod’s documentation!" href="index.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="modules.html" title="DirectDemod: Modules documentation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Welcome to DirectDemod’s documentation!"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">DirectDemod documentation</a> &#187;</li>
</ul>
</div>

<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">

<div class="section" id="directdemod-getting-started">
<h1>DirectDemod: Getting Started<a class="headerlink" href="#directdemod-getting-started" title="Permalink to this headline"></a></h1>
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h2>
<p>DirectDemod is written in python3 and uses the following libraries:</p>
<p>Mandatory:</p>
<ul class="simple">
<li>scipy</li>
<li>numpy</li>
<li>matplotlib</li>
<li>PIL</li>
<li>colorsys</li>
</ul>
<p>Optional: (Only used for map overlay for NOAA images)</p>
<ul class="simple">
<li>pyorbital</li>
<li>Basemap</li>
<li>cartopy</li>
</ul>
<p>Please make sure you have all the mandatory libraries installed.</p>
<p>Clone the repo into a folder and run “python main.py”. If you get a usage statement, you are good to go. The usage statement has all the commands that can be given to the program.</p>
</div>
<div class="section" id="specific-applications">
<h2>Specific applications<a class="headerlink" href="#specific-applications" title="Permalink to this headline"></a></h2>
<p>Following are the application specific guides. Assuming you already know how to record RTLSDR data to a .wav or a .dat file.</p>
</div>
<div class="section" id="to-decode-noaa-image">
<h2>To decode NOAA image<a class="headerlink" href="#to-decode-noaa-image" title="Permalink to this headline"></a></h2>
<p>If you want to decode a NOAA IQ data into images you can run the command:</p>
<blockquote>
<div>python main.py -c 137000000 -f 137100000 -d noaa “file.wav”</div></blockquote>
<p>here 13700000 is the centre frequency of the input file. 137100000 is the frequency of the satellite. “-d noaa” tells the program to use a noaa decoder on this. You should change these to match the file you have. When you run this, it will continuously print the status of decoding.</p>
<p>If you are skeptical if these settings are right and just want to test a portion of your file you can use the -s and -e options. For example if I want to just decode the file from 1000000 sample number to 2000000 sample number I can use the command,</p>
<blockquote>
<div>python main.py -c 137000000 -f 137100000 -s 1000000 -e 2000000 -d noaa “file.wav”</div></blockquote>
<p>This is especially helpful to just do a small test run to make sure it has found the signal.</p>
<p>This will just generate a black and white image, and a color image if right channels are detected. You can have a look at other commands from the usage statement.</p>
<p>In case the signal is not found or is very noisy you can do the following trouble shooting:</p>
<ul class="simple">
<li><dl class="first docutils">
<dt>sometimes I and Q channels migt be swapped, so use the -q flag to try to un-swap and try decoding.</dt>
<dd>e.g. python main.py -c 137000000 -f 137100000 -q -d noaa “file.wav”</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>If the signal is very noisy, you can play around with the bandwidth of the main filter by using the -b option</dt>
<dd>e.g. python main.py -c 137000000 -f 137100000 -b 1000000 -d noaa “file.wav”</dd>
</dl>
</li>
<li>Try opening the file in a gui like SDRSHARP and make sure you can see and hear the characteristic NOAA waterfall. Note down the frequency and make sure you are providing accurate inputs to the program.</li>
</ul>
</div>
<div class="section" id="to-get-sync-locations-in-iq-recordings">
<h2>To get sync locations in IQ recordings<a class="headerlink" href="#to-get-sync-locations-in-iq-recordings" title="Permalink to this headline"></a></h2>
<p>Currently the program has implementations of NOAA, Meteor M2 and Funcube (similar cubesats) so that accurate sync locations within the file could be found.</p>
<p>Similar to NOAA image extraction, if you provide the flag -sync, the program will generate a .csv file with the corresponding sync locations.
For Funcube or Meteor satellites, the process is similar, but no need to pass -sync flag, the .csv file will be automatically generated.</p>
</div>
</div>


</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">DirectDemod: Getting Started</a><ul>
<li><a class="reference internal" href="#installation">Installation</a></li>
<li><a class="reference internal" href="#specific-applications">Specific applications</a></li>
<li><a class="reference internal" href="#to-decode-noaa-image">To decode NOAA image</a></li>
<li><a class="reference internal" href="#to-get-sync-locations-in-iq-recordings">To get sync locations in IQ recordings</a></li>
</ul>
</li>
</ul>

<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">Welcome to DirectDemod’s documentation!</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="modules.html"
title="next chapter">DirectDemod: Modules documentation</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/gettingstarted.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="modules.html" title="DirectDemod: Modules documentation"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="Welcome to DirectDemod’s documentation!"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">DirectDemod documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2018, Vinay C K (7andahalf).
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.4.
</div>
</body>
</html>

0 comments on commit f772e26

Please sign in to comment.