Saravanan666/pypi-org huggingface dataset:
Package: pysatCDF
pysatCDFSelf-contained Python reader for NASA CDF file formatUses standard and extended Fortran CDF interfaces to load Common Data Format (CDF) files into Python.Exampleimport pysatCDF
with pysatCDF.CDF(filename) as cdf:

    # All variable data loaded into dictionary in .data
    cdf.data
    data = cdf.data[name]
    # Attributes dictionary
    cdf.meta
    attribute = cdf.meta[name][attr_name]

    # CDF variable information available by name
    cdf[name]

    # Data access similar to other packages
    data = cdf[name][...]
    attribute = cdf[name].attrs[attr_name]

    # Export data to pysat data and metadata format
    data, meta = cdf.to_pysat()TestingpysatCDF has been tested on Mac OS X and Ubuntu 15.04. Support is included
for building on windows via Windows Subsystem for Linux.MotivationProvide simple, robust access to CDF data in Python and simplify
adding instruments topysat.Installation in POSIX compatible environmentsActual CDF loading is performed by the [NASA CDF libraries] (http://cdf.gsfc.nasa.gov/html/sw_and_docs.html)
which are included with pysatCDF.To install pysatCDFgit clone https://github.com/rstoneback/pysatCDF.git
cd pysatCDF
python setup.py installInstalling pysatCDF in MacOSMacOS does not ship with a Fortran compiler. One method for getting a suitable
build environment is to use brew.brew install gccand then install pysatCDF as normal.Installing pysatCDF in WindowsInstall the Windows Subsytem for Linux and proceed as per POSIX installation.Change LogAll notable changes to this project will be documented in this file.
This project adheres toSemantic Versioning.[0.3.2] - 2022-05-13New FeaturesCompatible with pysat v3.0+DeprecationsDocumentationAdded pull request templates and other GitHub project documentation.Switched Windows installation instructions to favor installing WSL.Bug FixImproved builds for newer compilers.Replaces uninterpretable characters with '*' so data loading may continue.MaintenanceAdopted latest pysat development standards.Shifted from TravisCI to GitHub Actions for online testing.Adopted setup.cfgImproved PEP8 compliance
Package: pysatchel
SatchelSatchel is a compendium of pure python functions to carry with you and get things done.Installationpip install PySatchelUsageSometimes it is useful to split a list into smaller lists to work with.>>>importsatchelimportchunk>>>some_list=[1,2,3,4,5]>>>chunk(some_list,2,"length",True)# [[1, 2], [3, 4], [5]]>>>chunk(some_list,2,"count",True)# [[1, 2, 3], [3, 5]]You can also group values and apply a function to the groups.>>>importsatchelimportgroupapply>>>string="AAABBAAAACCB">>>groupapply(string,apply="count")# {'A': 7, 'B': 3, 'C': 2}>>>data=[1,1,2,2,2,1,4]>>>groupapply(data,key=lambdax:"lower"ifx<3else"higher",apply="count")# {'lower': 6, 'higher': 1}>>>data=[{"label":"a","val":1},{"label":"a","val":10},{"label":"a","val":4},{"label":"b","val":6},{"label":"b","val":3},]>>>groupapply(data,lambdad:d["label"],lambdal:sum([d["val"]fordinl]))# {'a': 15, 'b': 9}>>>data=[{"label":"a","val":1},{"label":"a","val":1},{"label":"a","val":1},{"label":"b","val":2},{"label":"b","val":2},]>>>groupapply(data,"label","count")# {'a': 3, 'b': 2}
Package: pysatdata
Basic documentation for pySatDataMost functions' structure and some loaders are from the pySPEDAS (https://github.com/spedas/pyspedas) repository. I just used and organized it in a way that I felt was more accessible for my purposes :). There is an option to store the variables in a pandas DataFrame format or pytplot format.RequirementsPython 3.8+Installation:conda create -n yourenvname python=x.x anaconda
conda activate yourenvname

pip install pysatdataconfig_file.jsonIt can be done in this file if some change in downloading directories is needed.pysatdata/resources/config_file.jsonThis file sets the HTTP directory for downloading data and the local directory to save the downloaded data.The local directory files are organized as http directory, i.e.:RBSP: HOME/sat_data/rbsp/rbspa/l2/ect/rept/sectors/rel03/YYYY/filename.cdfThis files handles with the different http subpaths for the different levels and intruments in each probe.Examples: Loading data.RBSP REPT data#Import the loading functions.frompysatdata.loaders.loadimport*# Define the time range for downloading data.trange=['2021-05-26','2021-05-30']# Loading Van Allen probes REPT data.varss_rept=load_sat(trange=trange,satellite="rbsp",probe=['a','b'],level="3",rel="rel03",instrument="rept",datatype="sectors",downloadonly=False,searchFilesFirst=True,usePandas=False,usePyTplot=True)RBSP EMFISIS data.varss_emfisis=load_sat(trange=trange,satellite="rbsp",probe=['a','b'],rel="rel03",level="3",instrument="emfisis",datatype="magnetometer",cadence="1sec",coord="gse",varnames=[],downloadonly=False,usePandas=True,usePyTplot=False)RBSP MAGEIS data.varss_mageis=load_sat(trange=trange,satellite="rbsp",probe=['a','b'],level="3",rel="rel03",instrument="mageis",datatype="sectors",downloadonly=False,usePandas=False,usePyTplot=True)RBSP EFW data.varss_efw=load_sat(trange=trange,satellite="rbps",probe=['a','b'],level="2",rel='rel03',instrument="efw",datatype="esvy_despun",varnames=['efield_mgse','lshell'],downloadonly=False,usePandas=False,usePyTplot=True)OMNI Solar wind datavarss_omni=load_sat(trange=trange,satellite="omni",probe="omni"instrument="omni_cdaweb",datatype="hro_1min",downloadonly=False,usePandas=False,usePyTplot=True)Seeplot_interpFlux_RBSP.pyfor an example of plotting the interpolated electron flux.
Package: pySatellite
pySatelliteSimulate satellite tracking.It tells the story of space debris and satellite collisions.To Infinity, and Beyond!cli$pySatellite-where-are-you-now1{API-KEY}{"info":{"satname":"CAS500-1","satid":47932,"transactionscount":0},"positions":[{"satlatitude":77.19527745,"satlongitude":21.20914327,"sataltitude":511.05,"azimuth":345.23,"elevation":-24.46,"ra":22.65957619,"dec":26.44078015,"timestamp":1627974910,"eclipsed":false}]}cli docstringusehttps://pysatellite.github.io/#usepypihttps://pypi.org/project/pySatellite
Package: pysatical
Generate ADIF For Satellite QSOs================================Quick Installation==================::pip install git+https://github.com/jeremymturner/pysatadif.gitUpgrading=========::pip install --upgrade git+https://github.com/jeremymturner/pysatadif.gitQuick Usage==========::$ pysatadif --satname SO-50 --timeon 0050 --qso N0CALL --qso N1CALL --qso N2CALL,DM00 --output adifFull Usage==========::usage: pysatadif [-h] -s SATNAME -n TIMEON [-f TIMEOFF] [-d QSODATE][-g MYGRID] [-r MYRIG] [-c OPERATOR] [-t TXPWR] -q QSO[-o OUTPUT] [-v]optional arguments:-h, --help            show this help message and exit-s SATNAME, --satname SATNAMESatellites to track-n TIMEON, --timeon TIMEONStart time of QSO (HHMMSS)-f TIMEOFF, --timeoff TIMEOFFEnd time of QSO (HHMMSS)-d QSODATE, --qsodate QSODATEQSO Date (YYYYMMDD)-g MYGRID, --mygrid MYGRIDMy grid square-r MYRIG, --myrig MYRIGMy rig-c OPERATOR, --operator OPERATORMy callsign-t TXPWR, --txpwr TXPWRTX Power-q QSO, --qso QSO     QSO callsign and optionally grid (eg N0CALL,DN70)-o OUTPUT, --output OUTPUTOutput Format (text, adif)-v, --verbose         Print verbose debugging messagesConfiguration=============Run pysatadif once. Then see $HOME/.pysatadif/defaults.jsonYou may configure your callsign, maidenhead grid square, radio, andtransmitting power which will apply to all passes. You may overridethese at any time by using the command-line switches.
Package: pysatIncubator
pysatIncubator: pysat development lab for instrumentsInstallationCurrently, the main way to get pysatIncubator is through github.git clone https://github.com/pysat/pysatIncubator.gitChange directories into the repository folder and run the setup.py file.  For a local install use the "--user" flag after "install".cd pysatIncubator/
python setup.py installNote: pre-1.0.0 versionpysatIncubator is currently in an initial development phase.  Much of the API is being built off of the upcoming pysat 3.0.0 software in order to streamline the usage and test coverage.  This version of pysat is planned for release later this year.  Currently, you can access the develop version of this through github:git clone https://github.com/pysat/pysat.git
cd pysat
git checkout develop-3
python setup.py installIt should be noted that this is a working branch and is subject to change.Using with pysatThe instrument modules are portable and designed to be run like any pysat instrument.import pysat
from pysatIncubator.instruments import champ_star

champ = pysat.Instrument(inst_module=champ_star)Another way to use the instruments in an external repository is to register the instruments.  This only needs to be done the first time you load an instrument.  Afterward, pysat will identify them using theplatformandnamekeywords.import pysat

pysat.utils.registry.register('pysatIncubator.instruments.champ_star')
champ = pysat.Instrument('champ', 'star')
Package: pysat-kamodo
AboutThis project tracks development of the kamodo-pysat interface. While pysat focuses
on providing a unified way of retrieving, loading and cleaning instrument data,
Kamodo provides a math-oriented API for interpolation, function composition,
and quick-look graphics. The combination of the two approaches simplifies
the workflow for science users, while minimizing the effort needed for science discovery.Installpip install pysat-kamodoUsagepki=Pysat_Kamodo('2009, 1, 1',# Pysat_Kamodo allows string datesplatform='cnofs',# pysat keywordname='vefi',# pysat keywordtag='dc_b',# pysat keyword)pki.B_up().head()2009-01-01 00:00:00   -3984.7746582009-01-01 00:00:01   -3966.7026372009-01-01 00:00:02   -3951.6315922009-01-01 00:00:03   -3936.4541022009-01-01 00:00:04   -3921.183594Name: B_up, dtype: float32Requirementspysat_kamodorequirespysatandkamodo:pip install pysatpip install kamodoThe following are needed for writing publication-ready graphics:conda install -c plotly plotly-orcaconda install psutilTo generate the documentation site:pip install mkdocspip install mknotebookspip install python-markdown-mathpip install markdown-includemkdocs serve (from base directory)
Package: pysatl
Python3 implementation of SATLSATL stands for 'Simple APDU Transport Layer'. It is a simple way to exchange ISO7816-4 APDUs over interfaces not covered in ISO7816-3.More info about SATL here:https://github.com/sebastien-riou/SATLPython3 package documentation:https://satl.readthedocs.io/en/latest/
Package: pySatlantic
pySatlanticPython package to unpack binary messages from Satlantic instruments.This module provides a simple way to unpack binary messages from Satlantic instruments (e.g. HyperSAS, HyperPro, HTSRB, HyperNAV). This is likely not the fastest implementation of the Satlantic protocol parser. However, it is easy to use and fast enough to process hyperspectral spectrums from multiple sensors (e.g. HyperSAS & Es) on a Raspberry Pi 3 in real-time.InstallationThe package runs with python 3 and can be installed from the setup file or directly with pip.# Installation through setup file
python setup.py install

# Installation through pip
pip install pySatlanticConvert binary files recorded with SatView to CSVThe module can be used to convert raw files recorded with SatView to CSV files.python -m pySatlantic [-h] [-v] [--version] [-i] cal srcor directly from the installed modulepython -m pySatlantic.__main__ [-h] [-v] [--version] [-i] cal srcpositional arguments:
cal             Calibration file.
src             Raw file to decode and calibrate.optional arguments:
-h, --help      show this help message and exit
-v, --verbose   Enable verbosity.
--version       Prints version information.
-i, --immersed  Apply immersion coefficients.Integrate in other softwareThe classInstrumentprovides key methods to handle the binary frames from Satlantic instrumentsread_calibration_file/read_calibration_dir/read_sip_file: Parse calibration file(s) needed to unpack and calibrate binary frames.find_frame: Find known frame in a binary arrayparse_frame: Unpack binary frame and apply calibration fit to convert data in scientific unitsThe classInstrumentsupport the immersed flag for each sensor independently. The immersion flag is accessible throughInstrument.cal[<frame_header>].immersedwithframe_headerbeing the sensor to be immersed or not.The classBinReaderhelps to separate individual frames looking for the registration bytesb'SAT'. An example of usage of that class isSatViewRawToCSVwhich converts a raw file recorded with SatView into a CSV file.Sensors TestedList of frames and associated calibration files tested:Es:HEDHSEHyperSASHLDHSLpySAS TowerUMTWRHTSRBHSDHSTTHSHyperProHPEHPLMPRPEDPLDSATBB2FSATFLCDHyperNAVSATXDZSATXLZSATXCZSATYCZOCR-504SATDI4NMEA$GPRMCSome functionalities of the Satlantic protocol are not implemented. Please make a feature request if you would like to the support of specific sensors (through the 'Issues' section of the GitHub repository).
Package: pysatMadrigal
pysatMadrigalpysatMadrigal allows users to import data from the Madrigal database into
pysat (pysat documentation).InstallationThe following instructions provide a guide for installing pysatMadrigal and
give some examples on how to use the routines.PrerequisitespysatMadrigal uses common Python modules, as well as modules developed by and
for the Space Physics community.  This module officially supports Python 3.7+.Common modulesCommunity modulesh5pymadrigalWeb>=2.6numpypysat >= 3.0.3pandasxarrayPyPi Installationpip install pysatMadrigalGitHub Installationgit clone https://github.com/pysat/pysatMadrigal.gitChange directories into the repository folder and run the setup.py file.  For
a local install use the "--user" flag after "install".cd pysatMadrigal/
python setup.py installExamplesThe instrument modules are portable and designed to be run like any pysat
instrument.import pysat
from pysatMadrigal.instruments import dmsp_ivm
ivm = pysat.Instrument(inst_module=dmsp_ivm, tag='utd', inst_id='f15')Another way to use the instruments in an external repository is to register the
instruments.  This only needs to be done the first time you load an instrument.
Afterward, pysat will identify them using theplatformandnamekeywords.pysat.utils.registry.register('pysatMadrigal.instruments.dmsp_ivm')
dst = pysat.Instrument('dmsp', 'ivm', tag='utd', inst_id='f15')
Package: pysatMissionPlanning
pysatMissionPlanning allows users to run build simulated satellites for TLE info and add empirical data. It includes the pysat_sgp4 instrument module which can be imported into pysat.Main FeaturesSimulate satellite orbits from TLEs and add data from empirical modelsImport ionosphere and thermosphere values through pyglowImport coordidnates through apexpyDocumentationFull Documentation for main package <http://pysat.readthedocs.io/en/latest/>_
Package: pysatMissions
pysatMissionspysatMissions allows users to run build simulated satellites for Two-Line Elements (TLE) and add empirical data.  It includes the missions_ephem and mission_sgp4 instrument modules which can be imported into pysat.Main FeaturesSimulate satellite orbits from TLEs and add data from empirical modelsImport magnetic coordinates through apexpy and aacgmv2 (optional install)DocumentationFull Documentation for main packageInstallationPrerequisitespysatMissions uses common Python modules, as well as modules developed by
and for the Space Physics community.  This module officially supports
Python 3.8+.Common modulesCommunity modulesOptional modulesnumpypysat>=3.0.4aacgmv2pandaspyEphemapexpysgp4>=2.7OMMBVskyfieldOne way to install is through pip.  Just typepip install pysatMissionsinto the terminal.Or, if you prefer to work directly from github, checkout the repository:git clone https://github.com/pysat/pysatMissions.gitChange directories into the repository folder and run the setup.py file.  For
a local install use the "--user" flag after "install".cd pysatMissions/
pip install .Note: pre-1.0.0 versionpysatMissions is currently in an initial development phase and requires pysat
3.0.4.Using with pysatThe instrument modules are portable and designed to be run like any pysat
instrument.import pysat
from pysatMissions.instruments import missions_sgp4

sim_inst = pysat.Instrument(inst_module=missions_sgp4)Another way to use the instruments in an external repository is to register the instruments.  This only needs to be done the first time you load an instrument.  Afterward, pysat will identify them using theplatformandnamekeywords.import pysat
import pysatMissions

pysat.utils.registry.register_by_module(pysatMissions.instruments)
sim_inst = pysat.Instrument('missions', 'sgp4')Optional modulesMagnetic vector coordinates through apexpy and aacgmv2 are set up as optional
installs. Both packages require fortran to install properly, and may require
additional configuration.  Both can be installed from pip, but may require the--no-binaryoption depending on your system.The instrumentmissions_ephemhas been deprecated since pyEphem is no longer
maintained. This will be removed in v0.4.0.  Note that OMMBV is required for
this instrument to function correctly, but is not required for the core
pysatMissions package.  This has also been made optional to improve installation.Please use themissions_sgp4instrument for future needs.The orbital trajectories can be calculated without any of the optional modules.
Package: pysatModels
pysatModelspysatModels handles model-centric data loading through pysat and contains a
variety of tools to perform model-data analysis, including model validation.Come join us on Slack! An invitation to the pysat workspace is available
in the 'About' section of thepysat GitHub Repository.InstallationThe following instructions will allow you to install pysatModels and give some
examples on how to use the routinesPrerequisitespysatModels uses common Python modules, as well as modules developed by and for
the Space Physics community.  This module officially supports Python 3.6+.Common modulesCommunity modulesnumpypysatpandaspyForecastToolsrequestsscipyxarrayInstallation through PyPipip install pysatmodelsInstallation from GitHubClone the git repository:git clone https://github.com/pysat/pysatModels.gitInstall pysatModels:
Change directories into the repository folder and run the setup.py file.
There are a few ways you can do this:
A. Install on the system (root privileges required):sudo python3 setup.py installB. Install at the user level:python3 setup.py install --userC. Install with the intent to develop locally:python3 setup.py develop --userRunning the codeExamples for using the different pysatModels utilities are included in thedocumentation.If you're unfamiliar with pysat, tutorials and examples are available in itsdocumentation.
Package: pysatNASA
pysatNASA: pysat support for NASA Space Science instrumentsInstallationThe following instructions provide a guide for installing pysatNASA and give
some examples on how to use the routinesPrerequisitespysatNASA uses common Python modules, as well as modules developed by
and for the Space Physics community.  This module officially supports
Python 3.6+.Common modulesCommunity modulesOptional Modulesbeautifulsoup4cdflib>=0.4.4pysatCDFlxmlpysat>=3.1.0netCDF4numpypandasrequestsxarrayPyPi Installationpip install pysatNASAGitHub Installationgit clone https://github.com/pysat/pysatNASA.gitChange directories into the repository folder and build the project.  For
a local install use the "--user" flag after "install".cd pysatNASA/
pip install .Note: pre-1.0.0 versionpysatNASA is currently in an initial development phase and requires pysat 3.1.0.Feedback and contributions are appreciated.Using with pysatThe instrument modules are portable and designed to be run like any pysat instrument.import pysat
from pysatNASA.instruments import icon_ivm

ivm = pysat.Instrument(inst_module=icon_ivm, inst_id='a')Another way to use the instruments in an external repository is to register the
instruments.  This only needs to be done the first time you load an instrument.Afterward, pysat will identify them using theplatformandnamekeywords.import pysat

pysat.utils.registry.register(['pysatNASA.instruments.icon_ivm'])
ivm = pysat.Instrument('icon', 'ivm', inst_id='a')CDF IntegrationFor data products stored as CDF files, this package can use eithercdfliborpysatCDF.  Note thatcdflibis a pure python package and more readily
deployable across systems, whereaspysatCDFinterfaces with the fortran.This is a faster approach for loading data, but may not install on all systems.There are known issues withnumpy>=1.24. Therefore,pysatCDFis optional
rather than required.You can specify which load routine to use via the optionaluse_cdflibkwarg.
If no kwarg is specified,pysatNASAwill default topysatCDFif it is
successfully installed, and default tocdflibotherwise.ivm = pysat.Instrument('cnofs', 'ivm', use_cdflib=True)
Package: pysats
PySATSThis is a bridge to use some features ofSATSin a Python project.RequirementsPython: 3.8+ (required for guaranteeing insertion order in dicts)Pyjnius 1.3.0Set upCreate a Python environment that satisfied above requirements. To install Pyjnius, follow the steps inhttps://pyjnius.readthedocs.io/en/stable/installation.html#.Download the latest SATS JAR fromhttps://github.com/spectrumauctions/sats/releases/Place the SATS JAR together with the cplex.jar (which can be found in the CPLEX installation'sbinfolder) together in some directory on your machine, and set the PYJNIUS_CLASSPATH environment variable to the absolute path of this directory.UsageAfter having set up the environment according the the previous section, install the package$pipinstallpysats
...Use it in your project as follows. Have a look at thetest/directory for more examples.frompysatsimportPySatsgsvm=PySats.getInstance().create_gsvm()forbidder_idingsvm.get_bidder_ids():goods_of_interest=gsvm.get_goods_of_interest(bidder_id)print(f'Bidder_{bidder_id}:{goods_of_interest}')Verify installationThe best way to verify installation, and check if everything is wired up correctly, is to check out the project and to run the tests:$python-munittest
...Alternative to set up locally: PoetryYou can use Poetry to set up and test pysats locally. Install it as described inhttps://python-poetry.org/docs/#installation, and then run:$poetryinstall
...This will install all dependencies automatically. To test the setup, run:$poetryrunpython-munittest
...
Package: pysatSeasons
pysatSeasonspysatSeasons allows users to run seasonal data analyses over N-dimensional
data sets managed through the pysat module.Main FeaturesSeasonal binning and averaging routines for 1D and 2D distributions of nD data.Occurrence probability routines, daily or by orbit.Scatterplot of data_label(s) over two dimensions over a season.InstallationPrerequisitespysatSeasons uses common Python modules, as well as modules developed by
and for the Space Physics community.Common modulesCommunity modulesmatplotlibpysat >= 3.0.4numpypandasxarrayGitHub InstallationFirst, checkout the repository:git clone https://github.com/pysat/pysatSeasons.gitChange directories into the repository folder and run the setup.py file.  For
a local install use the "--user" flag after "install".cd pysatSeasons/
  python setup.py install