Package chianti :: Package fortranformat :: Module _output
[hide private]
[frames] | no frames]

Module _output

source code

Functions [hide private]
 
_calculate_sign(state, negative_flag) source code
 
_compose_a_string(w, state, val) source code
 
_compose_boz_string(w, m, state, val, ftype) source code
 
_compose_float_string(w, e, d, state, val, ftype)
Adapted from code in glibfortran which is written in C so is somwhat 'bit-pushy' in nature.
source code
 
_compose_i_string(w, m, state, val) source code
 
_compose_inf_string(w, ftype, sign_bit) source code
 
_compose_l_string(w, state, val) source code
 
_compose_nan_string(w, ftype) source code
 
_get_sign(val, incl_plus) source code
 
_output_float(w, d, e, state, ft, buff, sign_bit, zero_flag, ndigits, edigits) source code
 
_swapchar(s, ind, newch)
Helper function to make chars in a string mutableish
source code
 
_write_string(record, sub_string, pos)
Function that actually writes the generated strings to a 'stream
source code
 
left_pad(sub_string, width, pad_char) source code
 
output(eds, reversion_eds, values)
a function to take a list of valid f77 edit descriptors and respective values and output the corresponding string
source code
Variables [hide private]
  ALL_ED = ['BN', 'BZ', 'SP', 'SS', 'S', 'X', 'T', 'TR', 'TL', '...
  CONTROL_EDS = (<class 'chianti.fortranformat._edit_descriptors...
  ED1 = ['BN', 'BZ', 'SP', 'SS', 'S']
  ED10 = ['/']
  ED2 = ['X']
  ED3 = ['T', 'TR', 'TL', 'L']
  ED4 = ['A']
  ED5 = ['D', 'F']
  ED6 = ['B', 'I', 'O', 'Z']
  ED7 = ['E', 'EN', 'ES', 'G']
  ED8 = ['P']
  ED9 = [':']
  G0_NO_BLANKS = False
  IS_PYTHON3 = False
  NON_REVERSION_EDS = (<class 'chianti.fortranformat._edit_descr...
  OUTPUT_EDS = (<class 'chianti.fortranformat._edit_descriptors....
  PROC_DECIMAL_CHAR = '.'
  PROC_MIN_FIELD_WIDTH = 46
  PROC_NO_LEADING_BLANK = False
  PROC_SIGN_ZERO = False
  REPEATABLE_EDS = ['L', 'A', 'D', 'F', 'B', 'I', 'O', 'Z', 'E',...
  __package__ = 'chianti.fortranformat'
Function Details [hide private]

_compose_float_string(w, e, d, state, val, ftype)

source code 

Adapted from code in glibfortran which is written in C so is somwhat 'bit-pushy' in nature. Writes the value to an initial string (buffer) and then pulls the subsequent strings from that


Variables Details [hide private]

ALL_ED

Value:
['BN',
 'BZ',
 'SP',
 'SS',
 'S',
 'X',
 'T',
 'TR',
...

CONTROL_EDS

Value:
(<class 'chianti.fortranformat._edit_descriptors.BN'>,
 <class 'chianti.fortranformat._edit_descriptors.BZ'>,
 <class 'chianti.fortranformat._edit_descriptors.P'>,
 <class 'chianti.fortranformat._edit_descriptors.SP'>,
 <class 'chianti.fortranformat._edit_descriptors.SS'>,
 <class 'chianti.fortranformat._edit_descriptors.S'>,
 <class 'chianti.fortranformat._edit_descriptors.X'>,
 <class 'chianti.fortranformat._edit_descriptors.T'>,
...

NON_REVERSION_EDS

Value:
(<class 'chianti.fortranformat._edit_descriptors.P'>,
 <class 'chianti.fortranformat._edit_descriptors.S'>,
 <class 'chianti.fortranformat._edit_descriptors.SP'>,
 <class 'chianti.fortranformat._edit_descriptors.SS'>,
 <class 'chianti.fortranformat._edit_descriptors.BN'>,
 <class 'chianti.fortranformat._edit_descriptors.BZ'>)

OUTPUT_EDS

Value:
(<class 'chianti.fortranformat._edit_descriptors.L'>,
 <class 'chianti.fortranformat._edit_descriptors.A'>,
 <class 'chianti.fortranformat._edit_descriptors.D'>,
 <class 'chianti.fortranformat._edit_descriptors.F'>,
 <class 'chianti.fortranformat._edit_descriptors.B'>,
 <class 'chianti.fortranformat._edit_descriptors.I'>,
 <class 'chianti.fortranformat._edit_descriptors.O'>,
 <class 'chianti.fortranformat._edit_descriptors.Z'>,
...

REPEATABLE_EDS

Value:
['L', 'A', 'D', 'F', 'B', 'I', 'O', 'Z', 'E', 'EN', 'ES', 'G', '/']