Print

Print


Hi, Matt.

This is the list of angles I made working with Pelle yesterday, which matches up all the top/bot motor interval data dumped from MYA with our run times.

http://www.slac.stanford.edu/~jeremym/hps/svt_opening_angles.txt

I first compressed the MYA data into intervals where the motor was in the same position for >= 10 seconds (suggested by Tim).  Then I scraped the start times from the run spreadsheet and for each run found the motor position interval.  Then the motor position was converted to opening angle using Takashi’s formula (more on this below).  Runs without valid start or end times seemed to correspond closely to “JUNK” and so they were ignored; this list should contain most if not all of the good runs.  

The angles were computed in code from the Y stage values….

----------

private static final double ANGLE_CONVERSION = 832.714;

private double computeAngle(final double yStage) {
    double angle = (motorConstant - yStage) / ANGLE_CONVERSION;
    if (Side.BOT.equals(side)) {
        angle = -angle;
    }
    return angle;
}

----------

The motorConstant is set according to bot or top.

private static final double BOTTOM_ANGLE_CONSTANT = 17.397;
private static final double TOP_ANGLE_CONSTANT = 17.821;

This equation and the constant values were taken from some of Takashi’s slides

Finally, I entered those angles listed as topAngle and botAngle into the conditions system for the corresponding Y positions.

mysql> select * from svt_alignments where value != 0;
+------+---------------+-----------+------------------------+
| id   | collection_id | parameter | value                  |
+------+---------------+-----------+------------------------+
|  594 |          1010 |     13100 |   0.003068520524453775 |
|  597 |          1010 |     23100 | -0.0033041356336028917 |
|  849 |          1011 |     13100 |    0.00746162548005678 |
|  852 |          1011 |     23100 |  -0.007499693772411655 |
| 1359 |          1013 |     13100 |    0.00439094334909705 |
| 1362 |          1013 |     23100 |  -0.004185830909531962 |
| 1614 |          1014 |     13100 |   0.021401105301460045 |
| 1617 |          1014 |     23100 |  -0.020891926880057254 |
+------+---------------+-----------+------------------------+

For now we only have separate conditions sets for 4mm, 3mm, 2mm, 1.5mm, and 0.5mm.  Nominal has ‘0’ for both values and is not listed here.  Technically, it computed as a very small angle, but Pelle thought zero was good enough.

The Eng Run conditions ranges are currently set to the following.

mysql> select * from svt_alignments_engrun_view;
+-----+-----------+---------+---------------+----------------------+--------+
| id  | run_start | run_end | collection_id | description          | n_runs |
+-----+-----------+---------+---------------+----------------------+--------+
| 345 |      4800 |    5036 |          1014 | 4 mm opening angle   |    237 |
| 342 |      5037 |    5063 |          1011 | 3 mm opening angle   |     27 |
| 343 |      5066 |    5079 |          1013 | 2 mm opening angle   |     14 |
| 384 |      5139 |    5148 |          1011 | 3 mm opening angle   |     10 |
| 385 |      5149 |    5157 |          1013 | 2 mm opening angle   |      9 |
| 386 |      5181 |    5198 |          1013 | 2 mm opening angle   |     18 |
| 344 |      5218 |    5229 |          1014 | 4 mm opening angle   |     12 |
| 388 |      5253 |    5387 |          1010 | 1.5 mm opening angle |    135 |
| 391 |      5388 |    5402 |          1014 | 4 mm opening angle   |     15 |
| 389 |      5404 |    5412 |          1010 | 1.5 mm opening angle |      9 |
| 390 |      5538 |    5611 |          1010 | 1.5 mm opening angle |     74 |
| 357 |      5623 |    5743 |          1012 | 0.5 mm opening angle |    121 |
| 392 |      5713 |    5713 |          1010 | 1.5 mm opening angle |      1 |
| 393 |      5714 |    5746 |          1012 | 0.5 mm opening angle |     33 |
| 395 |      5747 |    5747 |          1010 | 1.5 mm opening angle |      1 |
| 396 |      5748 |    5797 |          1012 | 0.5 mm opening angle |     50 |
+-----+-----------+---------+---------------+----------------------+————+

These ranges probably don’t match up great with the MYA data right now (something we could improve) but they correspond pretty well with what is listed in the spreadsheet.  

I know right now that some of these runs are not configured correctly, as Pelle stated previously.  For instance, in at least one run, the SVT was moved into the closed position during the first ~20 minutes of a 2 hour run.  But my code uses the run start to match up to the MYA data.  So for most of the events in that particular run, the angle setting would be incorrect.  

I hope everything is more clear now.  If anything seems wrong here, then please let me know.

—Jeremy

On Jun 4, 2015, at 3:19 PM, Graham, Mathew Thomas <[log in to unmask]> wrote:


It does look like I ran before the database had been updated.  They still look a bit screwy though.  Below is the new plot of y0; the bottom tracks are ~centered but the top ones only move over a little bit (also below, blue old; black new).  Can you double check the equation you used for the top again? 


<PastedGraphic-1.png>
<PastedGraphic-2.png>

On Jun 4, 2015, at 10:11 AM, Graham, Mathew Thomas <[log in to unmask]> wrote:

I’m rerunning 5043 to check whether I was too quick on the draw.  

It would be good if we could print out  the values taken from the db so that they’d be in the log file...

On Jun 4, 2015, at 10:10 AM, Hansson Adrian, Per Ola <[log in to unmask]> wrote:


Yeah that looks weird. I’ll look at it again today to see what the motor positions where.


On Jun 4, 2015, at 10:05 AM, Graham, Mathew Thomas <[log in to unmask]> wrote:


Hi Folks, 

I ran over these runs:

5043   +/- 3mm
5072   +/- 2mm
5569 +/- 1.5mm
5772  +/-  0.5mm

The recon, dst, and dqm files are at: 

/volatile/hallb/hps/data/recon/*3.3.1*
/home/hps/hps-work/data/data_quality/EngRun2015/pass1/dqm


5569 & 5772 tracks look fine, but the y0 for tracks are screwed for 5072 & 5043 in a similar way as we saw before correcting for the right sags.  Here is y0(==z0 in tracking frame) from 5072; the left bump is  from bottom tracks; right from top.   

<PastedGraphic-2.png>

(5722 is also in that directory but was a typo of 5772…5722 was a weird run) 

Thanks, Matt


Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1





Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1




Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1




Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1