This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Load an OBX file into a new OB.''' | |
# Copyright (c) 2018, Michael Pruemm | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""A very basic interface to the COP API. | |
See https://www.eso.org/copdemo/apidoc/ for API details. | |
To use: | |
>>> login('52052', 'tutorial') | |
>>> runs, __ = request('GET', '/obsRuns') | |
>>> len(runs) | |
31 | |
>>> muse_run = [r for r in runs if r['instrument'] == 'MUSE'][0] | |
>>> ob, obEtag = request('POST', |