pyRinexpro.session¶
SessionStatus¶
ASession¶
-
class
pyRinexpro.
ASession
(client, id)¶ Bases:
object
An abstract class that containt the minimal Session data to request the api
Parameters: - client (Client) – The client to request the api
- id (int) – The session id
-
delete
()¶ Delete this session
-
getFile
(file_type, save_to='')¶ Get a file associated to the session
Example:
>>> session.getFile('nav', 'new_nav_file')
Parameters: - file_type (str) – The file type, ‘orig’, ‘obs’ or ‘nav’, not case sensitive
- save_to (str) – The path to save the file (default is ‘’)
Returns: The content of the file if save_to is ‘’ or self
Return type: list(byte) or ASession
-
export
(path_or_buf=None)¶ Export the pdf report file
Parameters: path_or_buf (str or file) – The path or the file-like object to save the file (default is None) Returns: The content of the file if save_to is ‘’ or self Return type: list(byte) or None
-
setAccess
(access)¶ Set the access of the session, this method update self
Example:
>>> session.setAccess('public')
Parameters: access (str) – The access type, ‘public’ or ‘private’, not case sensitive Returns: self Return type: ASession
-
newProcess
(algo, *args, params=None, wait=False, refresh_rate=10, **kwarg)¶ Create a new process for the session
Example:
>>> process = session.newProcess('ppp', mode='kinematic')
Parameters: - algo (str) – The algorithm name ‘ppp’ or ‘diff’, case sensitive
- *args – The same parameter as ParamsPPP.__init__() or ParamsDiff.__init__(), used when params is None
- params (ParamsPPP or ParamsDiff) – The parameters of the algorithm (default is None)
- wait (bool) – wait for the process to finish (default is None)
- refresh_rate (int) – The time in second between each update, used when wait is True (default is 10)
- **kwarg – The same parameters as ParamsPPP.__init__() or ParamsDiff.__init__(), used when params is None
Returns: The created Process
Return type:
Session¶
SessionList¶
-
class
pyRinexpro.
SessionList
(json_obj, client)¶ Bases:
collections.UserList
A list of Session
Parameters: - json_obj (object) – The parsed json
- client (Client) – The client to request the api
-
df
()¶ Format the object to pandas DataFrame
Returns: The DataFrame Return type: pandas.DataFrame
-
to_csv
(path_or_buf=None, sep=', ')¶ Format and save the object to a csv file
Example:
>>> sessions.to_csv('sessions.csv')
Parameters: - path_or_buf (str or file) – The path or the file-like object to save the file (default is None)
- sep (str) – the csv separator (default is ‘,’)
Returns: Return the csv as a string is path_or_buf is None
Return type: str or None
-
to_kml_obj
(kml=None)¶ Format the object to a kml object
Parameters: kml (object) – The kml object, if None a kml object is created (default is None) Returns: Return the kml object Return type: object
-
to_kml
(path_or_buf=None)¶ Format and save the object to a kml file
Example:
>>> sessions.to_kml('sessions.kml')
Parameters: path_or_buf (str or file) – The path or the file-like object to save the file (default is None) Returns: Return the kml as a string if path_or_buf is None Return type: str or None
-
to_kmz
(path)¶ Format and save the object to a kmz file
Example:
>>> sessions.to_kmz('sessions.kmz')
Parameters: path_or_buf (str or file) – The path or the file-like object to save the file (default is None)
-
to_geojson_obj
(geojson_obj=None)¶ Format the object to a geojson file
Parameters: geojson_obj (object) – The geojson object, if None a geojson object is created (default is None) Returns: The geojson object Return type: object
-
to_geojson
(path_or_buf=None)¶ Format and save the object to a geojson file
Example:
>>> sessions.to_geojson('sessions.json')
Parameters: path_or_buf (str or file) – The path or the file-like object to save the file (default is None) Returns: Return the geojson as a string if path_or_buf is None Return type: str or None