Project

General

Profile

Bug #1611

Problem

Added by Rogers, Chris about 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Python API
Start date:
21 January 2015
Due date:
% Done:

100%

Estimated time:

Description

I run:

import cdb
from cdb import BeamlineSuperMouse

def main():
    blm_super = BeamlineSuperMouse("http://preprodcdb.mice.rl.ac.uk")
    print blm_super.get_beamline_for_tag("6-200+M0")
    print blm_super.get_beamline_for_tag("MockDataRunTest2")

if __name__ == "__main__":
    main()

and get:

{'6-200+M0': {'beam_stop': 'Open', 'diffuser_thickness': 6, 'magnets': {'Q1': 102.38, 'Q3': 89.0, 'Q2': 127.91, 'Q5': 212.02, 'Q4': 158.1, 'Q7': 138.67, 'Q6': 140.57, 'Q9': 179.18, 'Q8': 209.82, 'D2': 94.15, 'DS': 668.63, 'D1': 323.15}, 'proton_absorber_thickness': 6}}
{'MockDataRunTest2': {'beam_stop': 'Open', 'diffuser_thickness': 1111, 'magnets': {'Q1': 184.4, 'Q3': 112.6, 'Q2': 101.2, 'Q5': 395.6, 'Q4': 295.0, 'Q7': 197.8, 'Q6': 260.9, 'Q9': 253.5, 'Q8': 298.4, 'D2': 167.7, 'DS': 200.0, 'D1': 387.9}, 'proton_absorber_thickness': 1111}, '6-200+M0': {'beam_stop': 'Open', 'diffuser_thickness': 6, 'magnets': {'Q1': 102.38, 'Q3': 89.0, 'Q2': 127.91, 'Q5': 212.02, 'Q4': 158.1, 'Q7': 138.67, 'Q6': 140.57, 'Q9': 179.18, 'Q8': 209.82, 'D2': 94.15, 'DS': 668.63, 'D1': 323.15}, 'proton_absorber_thickness': 6}}

I think I should get:

{'6-200+M0': {'beam_stop': 'Open', 'diffuser_thickness': 6, 'magnets': {'Q1': 102.38, 'Q3': 89.0, 'Q2': 127.91, 'Q5': 212.02, 'Q4': 158.1, 'Q7': 138.67, 'Q6': 140.57, 'Q9': 179.18, 'Q8': 209.82, 'D2': 94.15, 'DS': 668.63, 'D1': 323.15}, 'proton_absorber_thickness': 6}}
{'MockDataRunTest2': {'beam_stop': 'Open', 'diffuser_thickness': 1111, 'magnets': {'Q1': 184.4, 'Q3': 112.6, 'Q2': 101.2, 'Q5': 395.6, 'Q4': 295.0, 'Q7': 197.8, 'Q6': 260.9, 'Q9': 253.5, 'Q8': 298.4, 'D2': 167.7, 'DS': 200.0, 'D1': 387.9}, 'proton_absorber_thickness': 1111}}

Also available in: Atom PDF