Git Product home page Git Product logo

arfcn-reference's Introduction

arfcnreference

https://travis-ci.org/sitch-io/arfcn-reference.svg?branch=master Test Coverage Code Climate Issue Count

ARFCN reference Python module

This Python module contains a reference for all GSM channels by ARFCN.

Installation:

pip install arfcnreference

Usage:

Get channel metadata by ARFCN:

>>> import arfcnreference
>>> arf_ref = arfcnreference.ArfcnReference()
>>> arf_ref.get_for_channel(665)
{'band': 'GSM-1900', 'downlink': 1960.8, 'uplink': 1880.8}

Get a channel by uplink frequency:

>>> arf_ref.get_for_uplink(890.2)
{'band': 'GSM-900', 'downlink': 935.2, 'channel': 1}

>>> arf_ref.get_for_downlink(887.4)
{'band': 'EGSM-900', 'uplink': 887.4, 'channel': 1011}

Frequencies are returned in MHz.

Getting channels for a range of frequencies:

>>> for x in arf_ref.arfcn_for_downlink_range(842, 942):
...     print x
...
{'1853': {'band': 'GSM-1900', 'uplink': 1853, 'channel': 526}}
{'1867': {'band': 'GSM-1900', 'uplink': 1867, 'channel': 596}}
{'1855': {'band': 'GSM-1900', 'uplink': 1855, 'channel': 536}}
{'1868': {'band': 'GSM-1900', 'uplink': 1868, 'channel': 601}}
(and so on)

Getting all channels in a band:

>>> for x in arf_ref.channels_in_band("GSM-850"):
...     print x
...
{'downlink': 869.2, 'uplink': 824.2, 'channel': 128}
{'downlink': 869.4, 'uplink': 824.4, 'channel': 129}
{'downlink': 869.6, 'uplink': 824.6, 'channel': 130}
{'downlink': 869.8, 'uplink': 824.8, 'channel': 131}
{'downlink': 870, 'uplink': 825, 'channel': 132}
(and so on)

Testing:

run py.test from the root of this repo.

Special thanks:

The reference information was lifted, with gratitude, from http://gnuradio.org/redmine/attachments/115/all_gsm_channels_arfcn.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.