Coverage for /Users/Newville/Codes/xraylarch/larch/io/__init__.py: 97%
29 statements
« prev ^ index » next coverage.py v7.3.2, created at 2023-11-09 10:08 -0600
« prev ^ index » next coverage.py v7.3.2, created at 2023-11-09 10:08 -0600
1"""
2ini doc
3"""
4__DOC__ = '''
5Functions for Input/Output, especially reading specific types
6of scientific data files.
7'''
9from .fileutils import (increment_filename, new_filename, new_dirname,
10 fix_filename, fix_varname, pathOf, unixpath,
11 winpath, nativepath, strip_quotes, get_timestamp,
12 asciikeys)
14from .columnfile import (read_ascii, write_ascii, write_group, set_array_labels,
15 guess_filereader, look_for_nans, read_fdmnes, sum_fluor_channels)
16from .xdi import read_xdi, XDIFile, XDIFileException
17from .mda import read_mda
18from .hdf5group import h5file, h5group, netcdf_file, netcdf_group
19from .xsp3_hdf5 import read_xsp3_hdf5
20from .xrf_netcdf import read_xrf_netcdf
21from .xrd_netcdf import read_xrd_netcdf
22from .xrd_hdf5 import read_xrd_hdf5
23from .xdi import read_xdi
24from .gse_escan import gsescan_group, gsescan_deadtime_correct
25from .gse_xdiscan import read_gsexdi, gsexdi_deadtime_correct, is_GSEXDI
26from .gse_mcafile import gsemca_group, GSEMCA_File
28from .save_restore import (save_session, load_session, read_session,
29 clear_session, is_larch_session_file,
30 save_groups, read_groups)
32from . import tifffile
33from .tifffile import TIFFfile
34from .athena_project import (is_athena_project, read_athena, AthenaProject,
35 create_athena, extract_athenagroup,
36 make_hashkey)
38from .xafs_beamlines import guess_beamline
39from .csvfiles import groups2csv, read_csv
40from .export_modelresult import export_modelresult
41from .mergegroups import merge_groups
43from .specfile_reader import (str2rng_larch, read_specfile, open_specfile,
44 is_specfile)
45from .stepscan_file import read_stepscan
47from .nexus_xas import NXxasFile
49def read_tiff(fname, *args, **kws):
50 """read image data from a TIFF file as an array"""
51 return tifffile.imread(fname, *args, **kws)
54__exports__ = dict(increment_filename=increment_filename,
55 new_filename=new_filename,
56 new_dirname=new_dirname,
57 fix_filename=fix_filename,
58 fix_varname=fix_varname,
59 pathOf=pathOf,
60 unixpath=unixpath,
61 winpath=winpath,
62 nativepath=nativepath,
63 strip_quotes=strip_quotes,
64 get_timestamp=get_timestamp,
65 asciikeys=asciikeys,
66 read_ascii=read_ascii,
67 look_for_nans=look_for_nans,
68 set_array_labels=set_array_labels,
69 guess_filereader=guess_filereader,
70 write_ascii=write_ascii,
71 write_group=write_group,
72 groups2csv=groups2csv,
73 read_csv=read_csv,
74 read_xdi=read_xdi,
75 sum_fluor_channels=sum_fluor_channels,
76 read_athena=read_athena,
77 create_athena=create_athena,
78 extract_athenagroup=extract_athenagroup,
79 export_modelresult=export_modelresult,
80 read_gsescan=gsescan_group,
81 gsescan_dtcorrect=gsescan_deadtime_correct,
82 read_gsemca=gsemca_group,
83 read_gsexdi=read_gsexdi,
84 gsexdi_deadtime_correct=gsexdi_deadtime_correct,
85 read_mda=read_mda,
86 read_stepscan=read_stepscan,
87 read_tiff=read_tiff,
88 merge_groups=merge_groups,
89 save_session=save_session,
90 clear_session=clear_session,
91 load_session=load_session,
92 read_session=read_session,
93 save_groups=save_groups,
94 read_groups=read_groups,
95 read_xrd_hdf5=read_xrd_hdf5,
96 read_xrd_netcdf=read_xrd_netcdf,
97 read_xrf_netcdf=read_xrf_netcdf,
98 read_xsp3_hdf5=read_xsp3_hdf5,
99 h5group=h5group,
100 h5file=h5file,
101 netcdf_file=netcdf_file,
102 netcdf_group=netcdf_group,
103 str2rng=str2rng_larch,
104 read_specfile=read_specfile,
105 specfile=open_specfile,
106 read_fdmnes=read_fdmnes
107 )
109_larch_builtins = {'_io':__exports__}