Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Print the central keys using: "facetdata.print_keys()"
  • Print the key entries of "data_struct" using: "facetdata.print_data_entries()"

params

  • Print all entries using: "facetdata.print_params_entries()"

  • Get information about the scan:

    print("number of steps:          ", facetdata.nSteps)
    print("number of shots per step: ", facetdata.n_shot)

    facetdata.print_scanPVs()
    facetdata.print_scanVals()




scalars

List all entries

  • using: "facetdata.print_scalars_entries()"


    Image Added

Common index concept

  • We explain the "common index" concept using "steps" as an example
    print all steps: "facetdata.print_steps()"
    Image Added
  • The list contains much more than just 20 x 50 = 1000 entries (number of shots per step x number of steps)
  • To get the number of successful shots:

    shotidx_list        = facetdata.get_shotidx_list()
    print("number of shots: ", facetdata.get_scan_length())
    print("shot idx:        ", shotidx_list)


    Image Added

    Note that the function "get_shotidx_list()" returns a "LinData" object that represents a list of all successful shots

  • To access scalar variables properly, we need to use the scalar common index:
    use the function "facetdata.get_scalar_cidx" to convert a shot index to a common index.

  • This is how it is done internally:
    Image Added
  • We can get a  "LinData" object with all scan values using "facetdata.get_scan_value_list()"
    Image Added
  • We can plot the scanned values:

    plot            = facet.FacetPlot(facetdata)
    plot.set_output_folder(output_folder)
    plot.scatter(shotidx_list, scan_value_list, colorylabel=False) 
    plot.save("scan_values", png=True)


    Image Added

Access scalar variables through lists

  • The lists are loaded during initialization; access them, e.g., using:
    print(facetdata.BSA_List_S20.dtype)
    Image Added

  • Access them using a "FacetScalar" object:

    bpm_3218_x            = facet.FacetScalar(facetdata, "BSA_List_S20", "BPMS_LI20_3218_X").get_data()
    bpm_3218_y            = facet.FacetScalar(facetdata, "BSA_List_S20", "BPMS_LI20_3218_Y").get_data()

    plot            = facet.FacetPlot(facetdata)
    plot.set_output_folder(output_folder)
    plot.scatter(bpm_3218_x, bpm_3218_y, colorylabel=False)  
    plot.save("bpm_3218", png=True)

    Image Added