-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from kadrlica/delve
Merging DELVE developments for 2020A
- Loading branch information
Showing
52 changed files
with
7,282 additions
and
14,161 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env python | ||
""" | ||
Automated obztak scheduling | ||
""" | ||
__author__ = "Alex Drlica-Wagner" | ||
|
||
from obztak import get_survey | ||
from obztak.auto import AutoObz | ||
from obztak.utils.parser import Parser | ||
|
||
def main(): | ||
parser = Parser() | ||
parser.add_argument("config", help="the configuration file") | ||
parser.add_argument('-k','--chunk', default=6., type=float, | ||
help = 'duration of chunk to schedule (minutes)') | ||
parser.add_argument("-q","--min-queue-len",default=25, type=int, | ||
help="minimum number of exposures in queue") | ||
parser.add_argument("-t","--min-queue-time",default=30, type=int, | ||
help="minimum queue time (minutes)") | ||
parser.add_argument('-m','--mode',default=None, | ||
help='mode for scheduler tactician.') | ||
args = parser.parse_args() | ||
|
||
print("REMINDER: Press 'Enable Auto' on the SISPI Exposure Control tab") | ||
auto = AutoObz(args.config) | ||
auto.chunk = args.chunk | ||
if args.mode: auto.mode = args.mode | ||
if args.min_queue_len: auto.min_queue_len = args.min_queue_len | ||
if args.min_queue_time: auto.min_queue_time = args.min_queue_time | ||
|
||
auto() | ||
|
||
if __name__ == "__main__": | ||
main() |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python | ||
""" | ||
Query the database | ||
""" | ||
import logging | ||
import pandas as pd | ||
from obztak.utils.database import Database | ||
from obztak.utils.parser import Parser | ||
|
||
parser = Parser(description=__doc__) | ||
parser.add_argument('--db',default='fnal',choices=['ctio','fnal'], | ||
help='database to query for exposures') | ||
parser.add_argument('-t','--timedelta',default='12h', | ||
help='time to query') | ||
parser.add_argument('-p','--propid',default=None, | ||
help='propid for query') | ||
args = parser.parse_args() | ||
|
||
db = Database(dbname='db-'+args.db) | ||
db.connect() | ||
df = db.qcInv(timedelta=args.timedelta,propid=args.propid) | ||
#pd.set_option('max_colwidth',18) | ||
pd.set_option('display.width',None) | ||
kwargs = dict(index=False, float_format='{:.2f}'.format, justify='right') | ||
table = df.fillna('').to_string(**kwargs) | ||
logging.info(table) |
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
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
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
Oops, something went wrong.