# sun_phy
A Python implementation of 802.15.4g LR-WPANs SUN PHYs : MR-FSK, MR-OFDM and MR-O-QPSK
## Installation
``pip install sun-phy``
## Usage
### MR-FSK
```python
from sun_phy import Mr_fsk_modulator
modulator = Mr_fsk_modulator(
# Set these parameters
phyMRFSKSFD=0,
phyFSKPreambleLength=4,
modulation='2FSK',
phyFSKFECEnabled=True,
phyFSKFECScheme=0,
macFCSType=0,
phyFSKScramblePSDU=True,
phyFSKFECInterleavingRSC=False)
# The message can also be sent as a numpy array of bytes or bits
I, Q, f = modulator.message_to_IQ(b'my message')
I, Q, f = modulator.mode_switch_to_IQ(
# Set these parameters
modeSwitchParameterEntry=0,
new_mode_fec=0)
```
### MR-OFDM
```python
from sun_phy import Mr_ofdm_modulator
modulator = Mr_ofdm_modulator(
# Set these parameters
MCS=3,
OFDM_Option=2,
phyOFDMInterleaving=0,
scrambler=0,
verbose=False # Verbose True enables printing of debugging info
)
# Similarly to MR-FSK, the message can by a byte or bits array
I, Q, f = modulator.message_to_IQ(b'my message')
```
### MR-O-QPSK
```python
from sun_phy import Mr_o_qpsk_modulator, Frequency_band
modulator = Mr_o_qpsk_modulator(
# Set these parameters
frequency_band=Frequency_band.Band_470MHz,
rate_mode=0,
spreading_mode=0)
I, Q, f = modulator.message_to_IQ(b'my message')
```
Raw data
{
"_id": null,
"home_page": "",
"name": "sun-phy",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,802.15.4g,mr-fsk,mr-o-qpsk,mr-ofdm,ofdm,modulation,modulator,sdr,iq",
"author": "Sebastien Deriaz",
"author_email": "sebastien.deriaz1@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/de/94/a0c02d8509f112d40916e0a99647cca10adb5197605cdbd7f7db39c7a38d/sun_phy-0.1.0.tar.gz",
"platform": null,
"description": "# sun_phy\n A Python implementation of 802.15.4g LR-WPANs SUN PHYs : MR-FSK, MR-OFDM and MR-O-QPSK\n\n\n## Installation\n\n``pip install sun-phy``\n\n## Usage\n\n### MR-FSK\n\n```python\n\nfrom sun_phy import Mr_fsk_modulator\n\nmodulator = Mr_fsk_modulator(\n # Set these parameters\n phyMRFSKSFD=0,\n phyFSKPreambleLength=4,\n modulation='2FSK',\n phyFSKFECEnabled=True,\n phyFSKFECScheme=0,\n macFCSType=0,\n phyFSKScramblePSDU=True,\n phyFSKFECInterleavingRSC=False)\n\n# The message can also be sent as a numpy array of bytes or bits\nI, Q, f = modulator.message_to_IQ(b'my message')\n\nI, Q, f = modulator.mode_switch_to_IQ(\n # Set these parameters\n modeSwitchParameterEntry=0,\n new_mode_fec=0)\n```\n\n### MR-OFDM\n\n```python\n\nfrom sun_phy import Mr_ofdm_modulator\n\nmodulator = Mr_ofdm_modulator(\n # Set these parameters\n MCS=3,\n OFDM_Option=2,\n phyOFDMInterleaving=0,\n scrambler=0,\n verbose=False # Verbose True enables printing of debugging info\n)\n\n# Similarly to MR-FSK, the message can by a byte or bits array\nI, Q, f = modulator.message_to_IQ(b'my message')\n```\n\n### MR-O-QPSK\n\n```python\n\nfrom sun_phy import Mr_o_qpsk_modulator, Frequency_band\n\nmodulator = Mr_o_qpsk_modulator(\n # Set these parameters\n frequency_band=Frequency_band.Band_470MHz,\n rate_mode=0,\n spreading_mode=0)\n\nI, Q, f = modulator.message_to_IQ(b'my message')\n```\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Software SUN PHY modulator",
"version": "0.1.0",
"split_keywords": [
"python",
"802.15.4g",
"mr-fsk",
"mr-o-qpsk",
"mr-ofdm",
"ofdm",
"modulation",
"modulator",
"sdr",
"iq"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a62dbfff3087ebd422d87abd361e60895a88b2d092e388d90c4eb158ecd1229a",
"md5": "dc22c03c459d0bd83c6add86582a3bf2",
"sha256": "668485d8f4a9a6bec216a07b3c3aea8d0d7d6e0c0174c8a37abe1880b303ecc3"
},
"downloads": -1,
"filename": "sun_phy-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dc22c03c459d0bd83c6add86582a3bf2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 58187,
"upload_time": "2023-02-04T14:58:17",
"upload_time_iso_8601": "2023-02-04T14:58:17.984106Z",
"url": "https://files.pythonhosted.org/packages/a6/2d/bfff3087ebd422d87abd361e60895a88b2d092e388d90c4eb158ecd1229a/sun_phy-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "de94a0c02d8509f112d40916e0a99647cca10adb5197605cdbd7f7db39c7a38d",
"md5": "cc87fcd6d11d75461ba19400315b9b60",
"sha256": "b5452feb5e40044eda94ecef729073e45e85df05ace412cd47eb715f2eb6079a"
},
"downloads": -1,
"filename": "sun_phy-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "cc87fcd6d11d75461ba19400315b9b60",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 48054,
"upload_time": "2023-02-04T14:58:19",
"upload_time_iso_8601": "2023-02-04T14:58:19.949312Z",
"url": "https://files.pythonhosted.org/packages/de/94/a0c02d8509f112d40916e0a99647cca10adb5197605cdbd7f7db39c7a38d/sun_phy-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-02-04 14:58:19",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "sun-phy"
}