GithubHelp home page GithubHelp logo

differences between pointers to _axis.id and construction of some loops compared to publication about instrument-geometry-info HOT 6 CLOSED

julianhoersch avatar julianhoersch commented on September 16, 2024
differences between pointers to _axis.id and construction of some loops compared to publication

from instrument-geometry-info.

Comments (6)

julianhoersch avatar julianhoersch commented on September 16, 2024
  • array_structure_list_axis.axis.id is a pointer to _axis.id above I'll change that I was not sure if this was correct.

  • _diffrn_detector_axis.axis.id is a pointer to axis.id I can change that as well. Actually this confused me also a bit - if you look at #30 there the axis_ids are

    loop_
      _diffrn_detector_axis.axis_id
      _diffrn_detector_axis.detector_id
         detx                     1
         dety                     1

and refer to detx and dety, not trans. Should it always be the translation axis? I guess there could also be more detector axes? I was trying to infer the detector axes from the /entry/instrument path when the the NX_class attribute is NXpositioner I'm not sure if that makes sense:

               # find detector axes
               # TODO can I extract it from the hdf5 with the number of nxpositioners?
               detector_axes = []
               instrument_group = h5_master[f'{scan}/instrument/']
               for sub_grp in instrument_group.keys():
                   try:
                       nx_class = instrument_group[sub_grp].attrs["NX_class"].decode('utf-8')
                       if "NXpositioner" in nx_class:
                           detector_axes.append(list(instrument_group[sub_grp].keys())[0])
                   except KeyError:
                       pass
               setup_info['detector_axes'] = detector_axes
  • only omega is scanned. Leave the other _axis.id out?? I can leave the other axes out if that's better. That would also mean that for other datasets, e.g. the data from #20, all axes except omega would be removed?
loop_
  _diffrn_scan_axis.scan_id
  _diffrn_scan_axis.axis_id
  _diffrn_scan_axis.displacement_start
  _diffrn_scan_axis.displacement_increment
  _diffrn_scan_axis.displacement_range
  _diffrn_scan_axis.angle_start
  _diffrn_scan_axis.angle_increment
  _diffrn_scan_axis.angle_range
         SCAN01    chi       .         .         .         -60.991   0         0        
         SCAN01    phi       .         .         .         -140.0    0         0        
         SCAN01    detector_2theta     .         .         .         12.4      0
          0         
         SCAN01    omega     .         .         .         -40.679   2.0       66.0     
         SCAN01    distance  40.0      0         0         .         .         .        
         SCAN02    chi       .         .         .         -60.991   0         0        
         SCAN02    phi       .         .         .         30.0      0         0        
         SCAN02    detector_2theta     .         .         .         12.4      0
          0         
         SCAN02    omega     .         .         .         -32.679   2.0       58.0     
         SCAN02    distance  40.0      0         0         .         .         .         
  • The construction with _diffrn_scan_axis is different this basically results from way the cbf_scan_extractor.jl did it and the fact that multiple scans can be present which makes a loop necessary (see code above)

  • diifrn_scan_frame is different if you refer to the integration_time I've moved that from _diffrn_scan.integration_time to _diffrn_scan_frame.integration_time since it was done like that in the cbf_scan_extractor.jl

  • the entries in _diffrn_data_frame also reflect those in the cbf_scan_extractor.jl

_diffrn_data_frame.id
_diffrn_data_frame.detector_element_id
_diffrn_data_frame.array_id
_diffrn_data_frame.binary_id

from instrument-geometry-info.

jamesrhester avatar jamesrhester commented on September 16, 2024

The reason we include all axes in _diffrn_scan_axis, even the ones that are not scanned, is because cbflib requires all axes to be included in the list, otherwise it fails. This is presumably because cbflib is supposed to read single-frame cbf files, and needs all axis positions present in all frames. But we can leave unscanned axes out as @kroon-lab suggests and the imgCIF file will still be correct.

from instrument-geometry-info.

kroon-lab avatar kroon-lab commented on September 16, 2024

diffrn_detector_axis.axis.id is a pointer to axis.id I can change that as well. Actually this confused me also a bit - if you look at
#30 there the axis_ids are
loop

_diffrn_detector_axis.axis_id
_diffrn_detector_axis.detector_id
detx 1
dety 1

@jamesrhester why would we use ### _diffrn_detector_axis anyway? The axes are already defined in ### _axis.

from instrument-geometry-info.

jamesrhester avatar jamesrhester commented on September 16, 2024

diffrn_detector_axis simply associates detector axes with particular detectors. It is not strictly necessary when there is only one detector. However, cbflib often insists on some of these categories being present in order for cbflib geometric calculations to function properly. If we wish to simplify use of our imgCIF for those who are using cbflib, it is probably a good idea to leave these categories in.

from instrument-geometry-info.

julianhoersch avatar julianhoersch commented on September 16, 2024

So I understand that _diffrn_detector_axis.axis_id should point to trans?

loop_
_diffrn_detector_axis.axis_id
_diffrn_detector_axis.detector_id
        trans                    1

not like in #30 to detx, dety

    loop_
      _diffrn_detector_axis.axis_id
      _diffrn_detector_axis.detector_id
         detx                     1
         dety                     1

from instrument-geometry-info.

kroon-lab avatar kroon-lab commented on September 16, 2024

Yes, _diffrn_detector_axis.axis_id should point to trans

@jamesrhester , was do you use detx and dety in #30 in _diffrn_detector_axis.axis_id ? and why not also for trans

from instrument-geometry-info.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.