Changeset bc6532e in sasview for src/sas/sascalc/dataloader
- Timestamp:
- Apr 4, 2017 5:59:47 PM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 56e2e3e
- Parents:
- 35009a0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/sesans_reader.py
r35009a0 rbc6532e 120 120 121 121 :param value: The magnitude of the measurement 122 :type value: Number123 122 :param value_unit: a string containing the final desired unit 124 :type value_unit: String125 123 :param default_unit: a string containing the units of the original measurement 126 :type default_unit: String127 124 :return: The magnitude of the measurement in the new units 128 125 """ 126 # (float, string, string) -> float 129 127 if has_converter and value_unit != default_unit: 130 128 data_conv_q = Converter(value_unit) … … 144 142 145 143 :param header: A dictionary of values 146 :type header: Dictionary147 144 :param key: A string which is a prefix for one of the keys in the dict 148 :type key: String149 145 :return: The value of the dictionary for the specified key 150 146 """ 147 # (dict<string, x>, string) -> x 151 148 index = [k for k in headers.keys() 152 149 if k.startswith(key)][0] … … 164 161 with the units for the values appended onto the string within square 165 162 brackets (See the example above) 166 :type header: Dictionary167 163 :param key: A string with the prefix of the dictionary key whose unit 168 164 is being fetched 169 :type key: String170 165 :return: A string containing the unit specifed in the header 171 166 """ 167 # (dict<string, _>, string) -> string 172 168 index = [k for k in params.keys() 173 169 if k.startswith(key)][0]
Note: See TracChangeset
for help on using the changeset viewer.