project8 / Pypeline

A python interface for the dripline slow control system.
Other
2 stars 0 forks source link

run script for data taking #41

Closed laroque closed 11 years ago

laroque commented 11 years ago

I'll just yank/paste the email thread....

So each doc in the database is currently: 'timestamp':<now() for when the dump was created>

: I'll fields: 'tag': It will be a string, if it is not unique the user will be warned and can either elect to use it anyway or enter a new one 'run_timestamp': We'll then have in each doc in the db: 'run_timestamp': when the button was pressed 'tag': user input string describing what this run is 'timestamp': when the specific sensor dump was taken : Should "abort" be "don't do any more things" or "skip to step 4, wherein everything gets returned to a 'safe' state" On Mon, Jun 3, 2013 at 10:23 AM, Jared Kofron jared.kofron@gmail.com wrote: hey ben, this sounds good to 0th order. i also want the following: a) when I start a run (by clicking this button), i want to be able to set a "tag" for the run - something like "no idea what the field is" or whatever. pypeline needs to go to the db and make sure that tag is unique, and then add that tag to every run document it generates. b) it should also tag each file with the time that the run button is pressed, to collate by time. then each run in the sequence has an absolute time it was taken, as well as a time to locate it relative to the start of the run. c) an abort button. it should be red. to answer your questsions: 1) i'm not sure yet 2) i'm not sure yet 3) i'm not sure yet 4) see answer to 1 On Mon, Jun 3, 2013 at 10:12 AM, Benjamin LaRoque laroque@physics.ucsb.edu wrote: To 0th order, I'll make something which pops up a window with one button that says "go" (much like the check heartbeat script). It will: 0) set every channel in some hard coded list to a hard coded default start condition (trap coil, dpph coil, sweeper, whatever) 1) do a 5 min mantis run with default mantis run parameters (default has as the file name or something human readable?) after a dump of all sensors (stored in the pypeline_sensor_dump database, the doc should have the egg file's name, I'll create a view based on egg name so that from an egg name one can easily get the sensor data). It shouldn't be too hard so I'll also add the mantis "final" to that doc in addition to the other sensors 2) cycle the trap (states are on, off, -on) 3) i++; while (i < 100): goto 1 4) set every channel to some hard coded safe set to end the run (coils off if nothing else) Things which maybe aren't 0th order but I'll probably put in from the start: 1) some amount of displayed output so the user knows it is still working, how far it has gone, etc. 2) user selection for the number of runs to take (item 3) Questions: 1) what other settings do you want to be able to adjust easily from the gui? 2) what default set of settings should i put in at step (0)? hard coding that list is easy but I'll no doubt mess botch it if I try on my own. 3) do we want to cycle through LO settings also, or will that be done manually? 4) other thoughts?
nsoblath commented 11 years ago

I'm not sure if this is the right place for this, but I'll mention something I brought up once-upon-a-time after the January run: it would be great if we could avoid colons in the filenames; macs are strongly opposed to such things.

nsoblath commented 11 years ago

Also I think a unique run number is a nice way to differentiate files, with any further information in the filename optional, and the descriptive information included in the run header (there's a place in the header specifically for that, btw). Run numbers are useful in automatic processing, and we could have shorter filenames.

laroque commented 11 years ago

I'm going to make some notes. They are mostly for myself but comments are welcome. For those keeping an eye on this, I'm hoping to get it finished prior to the start of business Thursday (later than originally suggested).

In pypeline_sensor_dump, all docs will now have: run_number run_tag run_timestamp sequence_number sequence_tag timestamp

run_number == 0 is "special" in that it is reserved for any sensor dump which is _not_ part of a run. It will always have an empty run_tag. It is useful for debugging digitizations etc. The sequence_tag is effectively a comment (ie not required as a filter for views). For a new run the user will provide a tag. Pypeline will will determine a run_timestamp (via datetime.now()) and the run_number (by counting the number of rows in the reduced run_info/sequence_count view of the pypeline_sensor_dump database). For each sequence sequence_number is determined by the value of the tag's row of the reduced run_info/sequence_count view. The run_ are determined if it is the first sequence or taken from the first sequence otherwise. The rest is done as it already does. Egg files will be named as ___. Where the prefix is provided by the user and should be short (ex june2013). The trap_state is one of 'on', 'off', or 'anti' but the egg header will have the actual trap current as a numerical value.
laroque commented 11 years ago

Stuck a knife in, looks like it may be done.... Probably not but it is implemented and this issue is closed. Upgrades and/or bug fixes should be specific and their own issue.