io
cif
handler
Minimal CIF tag handler used by descriptors/parameters.
CifHandler
Canonical CIF handler used by descriptors/parameters.
Holds CIF tags (names) and attaches to an owning descriptor so it can derive a stable uid if needed.
Source code in src/easydiffraction/io/cif/handler.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
attach(owner)
Attach to a descriptor or parameter instance.
Source code in src/easydiffraction/io/cif/handler.py
19 20 21 | |
names
property
List of CIF tag names associated with the owner.
uid
property
Unique identifier taken from the owner, if attached.
serialize
analysis_to_cif(analysis)
Render analysis metadata, aliases, and constraints to CIF.
Source code in src/easydiffraction/io/cif/serialize.py
184 185 186 187 188 189 190 191 192 193 194 195 | |
category_collection_to_cif(collection)
Render a CategoryCollection-like object to CIF text.
Uses first item to build loop header, then emits rows for each item.
Source code in src/easydiffraction/io/cif/serialize.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
category_item_from_cif(self, block, idx=0)
Populate each parameter from CIF block at given loop index.
Source code in src/easydiffraction/io/cif/serialize.py
231 232 233 234 | |
category_item_to_cif(item)
Render a CategoryItem-like object to CIF text.
Expects item.parameters iterable of params with
_cif_handler.names and value.
Source code in src/easydiffraction/io/cif/serialize.py
32 33 34 35 36 37 38 39 40 41 | |
datablock_collection_to_cif(collection)
Render a collection of datablocks by joining their CIF blocks.
Source code in src/easydiffraction/io/cif/serialize.py
127 128 129 | |
datablock_item_to_cif(datablock)
Render a DatablockItem-like object to CIF text.
Emits a data_ header and then concatenates category CIF sections.
Source code in src/easydiffraction/io/cif/serialize.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
datastore_to_cif(datastore, max_points=None)
Render a datastore to CIF text.
Expects datastore to have _cif_mapping() and attributes per
mapping keys.
Source code in src/easydiffraction/io/cif/serialize.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
experiment_to_cif(experiment)
Render an experiment: datablock part plus measured data.
Source code in src/easydiffraction/io/cif/serialize.py
177 178 179 180 181 | |
format_value(value)
Format a single CIF value, quoting strings with whitespace.
Source code in src/easydiffraction/io/cif/serialize.py
15 16 17 18 19 | |
param_to_cif(param)
Render a single descriptor/parameter to a CIF line.
Expects param to expose _cif_handler.names and value.
Source code in src/easydiffraction/io/cif/serialize.py
22 23 24 25 26 27 28 29 | |
project_info_to_cif(info)
Render ProjectInfo to CIF text (id, title, description, dates).
Source code in src/easydiffraction/io/cif/serialize.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
project_to_cif(project)
Render a whole project by concatenating sections when present.
Source code in src/easydiffraction/io/cif/serialize.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 | |
summary_to_cif(_summary)
Render a summary CIF block (placeholder for now).
Source code in src/easydiffraction/io/cif/serialize.py
198 199 200 | |