"/home/tthatcher/anaconda3/envs/autocnet/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
" from ._conv import register_converters as _register_converters\n"
"/home/tthatcher/anaconda3/envs/autocnet/lib/python3.6/site-packages/ipykernel_launcher.py:13: UserWarning: The following points found in ipf files missing from gpf file: \n",
"/Users/adampaquette/anaconda/envs/pysat/lib/python3.6/site-packages/ipykernel_launcher.py:12: UserWarning: The following points found in ipf files missing from gpf file: \n",
/home/tthatcher/anaconda3/envs/autocnet/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
# Reads a .atf file and outputs all of the
# .ipf, .gpf, .sup, .prj, and path to locate the
# .apf file (should be the same as all others)
defread_atf(atf_file):
defread_atf(atf_file):
withopen(atf_file)asf:
withopen(atf_file)asf:
"""
Read an .atf file and return a dict with .sup, .ipf, .prj, .gpf and
the path to the directory containing the files.
Parameters
----------
input_data : file
.atf file
Returns
-------
files : Python Dictionary
containing lists of the files mentioned above
"""
fromcollectionsimportdefaultdict
files=[]
ipf=[]
files=defaultdict(list)
sup=[]
files_dict=[]
# Grabs every PRJ, GPF, SUP, and IPF image from the ATF file
/Users/adampaquette/anaconda/envs/pysat/lib/python3.6/site-packages/ipykernel_launcher.py:12: UserWarning: The following points found in ipf files missing from gpf file:
/home/tthatcher/anaconda3/envs/autocnet/lib/python3.6/site-packages/ipykernel_launcher.py:13: UserWarning: The following points found in ipf files missing from gpf file: