Class: Rafflesia::MrcHeaderMetadata
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::MrcHeaderMetadata
- Defined in:
- lib/rafflesia/artifacts/mrc_header_metadata.rb
Constant Summary collapse
- HASH_ATTRS =
{ axis_order: :axis_order, cell_angles: :cell_angles, cell_angstrom: :cell_angstrom, columns: :columns, endian: :endian, grid_columns: :grid_columns, grid_rows: :grid_rows, grid_sections: :grid_sections, header_only: :header_only, header_size_bytes: :header_size_bytes, machine_stamp: :machine_stamp, max_density: :max_density, mean_density: :mean_density, min_density: :min_density, mode: :mode, origin_angstrom: :origin_angstrom, parser: :parser, rms_density: :rms_density, rows: :rows, sections: :sections, space_group_number: :space_group_number, symmetry_bytes: :symmetry_bytes, voxel_size_angstrom: :voxel_size_angstrom }.freeze
Instance Attribute Summary collapse
-
#axis_order ⇒ Object
Returns the value of attribute axis_order.
-
#cell_angles ⇒ Object
Returns the value of attribute cell_angles.
-
#cell_angstrom ⇒ Object
Returns the value of attribute cell_angstrom.
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#endian ⇒ Object
Returns the value of attribute endian.
-
#grid_columns ⇒ Object
Returns the value of attribute grid_columns.
-
#grid_rows ⇒ Object
Returns the value of attribute grid_rows.
-
#grid_sections ⇒ Object
Returns the value of attribute grid_sections.
-
#header_only ⇒ Object
Returns the value of attribute header_only.
-
#header_size_bytes ⇒ Object
Returns the value of attribute header_size_bytes.
-
#machine_stamp ⇒ Object
Returns the value of attribute machine_stamp.
-
#max_density ⇒ Object
Returns the value of attribute max_density.
-
#mean_density ⇒ Object
Returns the value of attribute mean_density.
-
#min_density ⇒ Object
Returns the value of attribute min_density.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#origin_angstrom ⇒ Object
Returns the value of attribute origin_angstrom.
-
#parser ⇒ Object
Returns the value of attribute parser.
-
#rms_density ⇒ Object
Returns the value of attribute rms_density.
-
#rows ⇒ Object
Returns the value of attribute rows.
-
#sections ⇒ Object
Returns the value of attribute sections.
-
#space_group_number ⇒ Object
Returns the value of attribute space_group_number.
-
#symmetry_bytes ⇒ Object
Returns the value of attribute symmetry_bytes.
-
#voxel_size_angstrom ⇒ Object
Returns the value of attribute voxel_size_angstrom.
Instance Method Summary collapse
-
#initialize(json) ⇒ MrcHeaderMetadata
constructor
A new instance of MrcHeaderMetadata.
Constructor Details
#initialize(json) ⇒ MrcHeaderMetadata
Returns a new instance of MrcHeaderMetadata.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 59 def initialize(json) super() hash = self.class.normalize(json) @axis_order = (hash[:axis_order] || []) @cell_angles = (hash[:cell_angles] || []) @cell_angstrom = (hash[:cell_angstrom] || []) @columns = hash[:columns] @endian = hash[:endian] @grid_columns = hash[:grid_columns] @grid_rows = hash[:grid_rows] @grid_sections = hash[:grid_sections] @header_only = hash[:header_only] @header_size_bytes = hash[:header_size_bytes] @machine_stamp = hash[:machine_stamp] @max_density = hash[:max_density] @mean_density = hash[:mean_density] @min_density = hash[:min_density] @mode = hash[:mode] @origin_angstrom = (hash[:origin_angstrom] || []) @parser = hash[:parser] ? Rafflesia::MapParserMetadata.new(hash[:parser]) : nil @rms_density = hash[:rms_density] @rows = hash[:rows] @sections = hash[:sections] @space_group_number = hash[:space_group_number] @symmetry_bytes = hash[:symmetry_bytes] @voxel_size_angstrom = (hash[:voxel_size_angstrom] || []) end |
Instance Attribute Details
#axis_order ⇒ Object
Returns the value of attribute axis_order.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def axis_order @axis_order end |
#cell_angles ⇒ Object
Returns the value of attribute cell_angles.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def cell_angles @cell_angles end |
#cell_angstrom ⇒ Object
Returns the value of attribute cell_angstrom.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def cell_angstrom @cell_angstrom end |
#columns ⇒ Object
Returns the value of attribute columns.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def columns @columns end |
#endian ⇒ Object
Returns the value of attribute endian.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def endian @endian end |
#grid_columns ⇒ Object
Returns the value of attribute grid_columns.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def grid_columns @grid_columns end |
#grid_rows ⇒ Object
Returns the value of attribute grid_rows.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def grid_rows @grid_rows end |
#grid_sections ⇒ Object
Returns the value of attribute grid_sections.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def grid_sections @grid_sections end |
#header_only ⇒ Object
Returns the value of attribute header_only.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def header_only @header_only end |
#header_size_bytes ⇒ Object
Returns the value of attribute header_size_bytes.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def header_size_bytes @header_size_bytes end |
#machine_stamp ⇒ Object
Returns the value of attribute machine_stamp.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def machine_stamp @machine_stamp end |
#max_density ⇒ Object
Returns the value of attribute max_density.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def max_density @max_density end |
#mean_density ⇒ Object
Returns the value of attribute mean_density.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def mean_density @mean_density end |
#min_density ⇒ Object
Returns the value of attribute min_density.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def min_density @min_density end |
#mode ⇒ Object
Returns the value of attribute mode.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def mode @mode end |
#origin_angstrom ⇒ Object
Returns the value of attribute origin_angstrom.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def origin_angstrom @origin_angstrom end |
#parser ⇒ Object
Returns the value of attribute parser.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def parser @parser end |
#rms_density ⇒ Object
Returns the value of attribute rms_density.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def rms_density @rms_density end |
#rows ⇒ Object
Returns the value of attribute rows.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def rows @rows end |
#sections ⇒ Object
Returns the value of attribute sections.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def sections @sections end |
#space_group_number ⇒ Object
Returns the value of attribute space_group_number.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def space_group_number @space_group_number end |
#symmetry_bytes ⇒ Object
Returns the value of attribute symmetry_bytes.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def symmetry_bytes @symmetry_bytes end |
#voxel_size_angstrom ⇒ Object
Returns the value of attribute voxel_size_angstrom.
34 35 36 |
# File 'lib/rafflesia/artifacts/mrc_header_metadata.rb', line 34 def voxel_size_angstrom @voxel_size_angstrom end |