diff --git a/cfel_cxi.py b/cfel_cxi.py index 7eb26dd718464f6582c3008d4d1de480b5b27785..9e196d3cbeaab4bf666dade7360585861a45b0e9 100644 --- a/cfel_cxi.py +++ b/cfel_cxi.py @@ -29,7 +29,6 @@ from builtins import str from collections import namedtuple import h5py -import numpy _CXISimpleEntry = namedtuple('SimpleEntry', ['path', 'data', 'overwrite']) @@ -45,7 +44,7 @@ class _Stack: self._data_shape = data.shape self._data_to_write = data - self._path = path + self.path = path self._axes = axes self._compression = compression @@ -61,28 +60,21 @@ class _Stack: else: return False - def is_there_data_to_write(self): - - if self._data_to_write is not None: - return True - else: - return False - def write_initial_slice(self, file_handle, max_num_slices): - file_handle.create_dataset(self._path, shape=(max_num_slices,) + self._data_shape, + file_handle.create_dataset(self.path, shape=(max_num_slices,) + self._data_shape, maxshape=(max_num_slices,) + self._data_shape, - compression = self._compression, chunks=self._chunk_size) - file_handle[self._path][0] = self._data_to_write + compression=self._compression, chunks=self._chunk_size) + file_handle[self.path][0] = self._data_to_write if self._axes is not None: - file_handle[self._path].attrs['axes'] = self._axes + file_handle[self.path].attrs['axes'] = self._axes self._data_to_write = None def write_slice(self, file_handle, curr_slice): - file_handle[self._path][curr_slice] = self._data_to_write + file_handle[self.path][curr_slice] = self._data_to_write self._data_to_write = None @@ -90,7 +82,7 @@ class _Stack: if self._data_to_write is not None: raise RuntimeError('Cannot append data to the stack entry at {}. The previous slice has not been written ' - 'yet.'.format(self._path)) + 'yet.'.format(self.path)) if type(data) != self._data_type: raise RuntimeError('The type of the input data does not match what is already present in the stack.') @@ -109,11 +101,11 @@ class _Stack: if self._data_to_write is not None: raise RuntimeError('Cannot finalize the stack at {}, there is data waiting to be ' - 'written.'.format(self._path)) + 'written.'.format(self.path)) final_size = curr_slice - file_handle[self._path].resize((final_size,) + self._data_shape) + file_handle[self.path].resize((final_size,) + self._data_shape) def _validate_data(data): @@ -160,8 +152,8 @@ class CXIWriter: f1.add_stack_to_writer('counter1', '/entry_1/detector_1/count', c1) f2.add_stack_to_writer('counter2', '/entry_1/detector_1/count', c2) - f1.write_simple_entry('/entry_1/detector_1/name', 'FrontCSPAD') - f2.write_simple_entry('/entry_1/detector_1/name', 'BackCSPAD') + f1.write_simple_entry('detectorname1', '/entry_1/detector_1/name', 'FrontCSPAD') + f2.write_simple_entry('detectorname2', '/entry_1/detector_1/name', 'BackCSPAD') f1.initialize_stacks() f2.initialize_stacks() @@ -181,6 +173,9 @@ class CXIWriter: f1.write_stack_slice_and_increment() f2.write_stack_slice_and_increment() + f1.create_link('detectorname1', '/name') + f2.create_link('detectorname2', '/name') + f1.close_file() f2.close_file() """ @@ -199,6 +194,7 @@ class CXIWriter: self._cxi_stacks = {} self._pending_simple_entries = [] + self._simple_entries = {} self._intialized = False self._curr_slice = 0 self._max_num_slices = max_num_slices @@ -256,6 +252,9 @@ class CXIWriter: _validate_data(initial_data) + if name in self._cxi_stacks: + raise RuntimeError('A stack with the provided name already exists.') + if self._initialized is True: raise RuntimeError('Adding stacks to the writer is not possible after initialization.') @@ -268,14 +267,17 @@ class CXIWriter: new_stack = _Stack(path, initial_data, axes, compression, chunk_size) self._cxi_stacks[name] = new_stack - def write_simple_entry(self, path, data, overwrite=False): + def write_simple_entry(self, name, path, data, overwrite=False): """Writes a simple, non-stack entry in the file. Writes a simple, non-stack entry in the file, at the specified path. A simple entry can be written at all times, - before or after the stack initialization. + before or after the stack initialization. THe user must provide a name that identifies the entry for further + operations (for example, creating a link). Args: + name (str): entry name + path (str): path in the hdf5 file where the entry will be written. data (Union: numpy.ndarray, str, int, float): data to write @@ -286,6 +288,15 @@ class CXIWriter: _validate_data(data) + if name in self._simple_entries: + raise RuntimeError('An entry with the provided name already exists.') + + if path in self._fh: + if overwrite is True: + del (self._fh[path]) + else: + raise RuntimeError('Cannot create the the entry. An entry already exists at the specified path.') + new_entry = _CXISimpleEntry(path, data, overwrite) if self._initialized is not True: @@ -293,6 +304,41 @@ class CXIWriter: else: self._write_simple_entry(new_entry) + self._simple_entries[name] = new_entry + + def create_link(self, name, path, overwrite=False): + """Creates a link to a stack or entry. + + Creates a link in the file, at the path specified, pointing to the stack or the entry identified by the + provided name. If a link or entry already exists at the specified path, it is deleted and replaced only if the + value of the overwrite parameter is True. + + Args: + + name (str): name of the stack or entry to which the link points. + + path (str): path in the hdf5 where the link is created. + + overwrite (bool): if set to True, an entry already existing at the same location will be overwritten. If set + to False, an attempt to overwrite an entry will raise an error. + """ + + if path in self._fh: + if overwrite is True: + del (self._fh[path]) + else: + raise RuntimeError('Cannot create the link. An entry already exists at the specified path.') + + try: + link_target = self._fh[self._cxi_stacks[name].path] + except KeyError: + try: + link_target = self._fh[self._simple_entries[name].path] + except: + raise RuntimeError('Cannot find an entry or stack with the proveded name.') + + self._fh[path] = link_target + def initialize_stacks(self): """Initializes the stacks. @@ -404,3 +450,48 @@ class CXIWriter: self._fh.close() self._file_is_open = False + + +if __name__ == '__main__': + import numpy + + c1 = 0 + c2 = 0 + + f1 = CXIWriter('test1.h5', ) + f2 = CXIWriter('test2.h5', ) + + f1.add_stack_to_writer('detector1', '/entry_1/detector_1/data', numpy.random.rand(2, 2), + 'frame:y:x') + f2.add_stack_to_writer('detector2', '/entry_1/detector_1/data', numpy.random.rand(3, 2), + 'frame:y:x', compression=False, chunk_size=(1, 3, 2)) + + f1.add_stack_to_writer('counter1', '/entry_1/detector_1/count', c1) + f2.add_stack_to_writer('counter2', '/entry_1/detector_1/count', c2) + + f1.write_simple_entry('detectorname1', '/entry_1/detector_1/name', 'FrontCSPAD') + f2.write_simple_entry('detectorname2', '/entry_1/detector_1/name', 'BackCSPAD') + + f1.initialize_stacks() + f2.initialize_stacks() + + a = numpy.random.rand(2, 2) + b = numpy.random.rand(3, 2) + + c1 += 1 + c2 += 2 + + f1.append_data_to_stack('detector1', a) + f2.append_data_to_stack('detector2', b) + + f1.append_data_to_stack('counter1', c1) + f2.append_data_to_stack('counter2', c2) + + f1.write_stack_slice_and_increment() + f2.write_stack_slice_and_increment() + + f1.create_link('detectorname1', '/name') + f2.create_link('detectorname2', '/name') + + f1.close_file() + f2.close_file() diff --git a/doc/build/doctrees/cfelpyutils.doctree b/doc/build/doctrees/cfelpyutils.doctree index f7fcad63c139cbbabdebc2add4aa5841893c6a9f..447fe6ec10ac30061864de9f704d06aa8556093d 100644 Binary files a/doc/build/doctrees/cfelpyutils.doctree and b/doc/build/doctrees/cfelpyutils.doctree differ diff --git a/doc/build/doctrees/environment.pickle b/doc/build/doctrees/environment.pickle index b25b8954d67843b8eee04b36c0bfc7de84be7e54..fa918e092bdeb8c07df61a429b0460a5cb092da8 100644 Binary files a/doc/build/doctrees/environment.pickle and b/doc/build/doctrees/environment.pickle differ diff --git a/doc/build/html/cfelpyutils.html b/doc/build/html/cfelpyutils.html index 1c0160ae1968dfef63b6ea45adb82712ef4c3c99..fba5fea547f35b2643ff95e7ac1a28fa7239c9be 100644 --- a/doc/build/html/cfelpyutils.html +++ b/doc/build/html/cfelpyutils.html @@ -159,8 +159,8 @@ f2 = CXIWriter(‘test2.h5’, )</p> </dl> <p>f1.add_stack_to_writer(‘counter1’, ‘/entry_1/detector_1/count’, c1) f2.add_stack_to_writer(‘counter2’, ‘/entry_1/detector_1/count’, c2)</p> -<p>f1.write_simple_entry(‘/entry_1/detector_1/name’, ‘FrontCSPAD’) -f2.write_simple_entry(‘/entry_1/detector_1/name’, ‘BackCSPAD’)</p> +<p>f1.write_simple_entry(‘detectorname1’, ‘/entry_1/detector_1/name’, ‘FrontCSPAD’) +f2.write_simple_entry(‘detectorname2’, ‘/entry_1/detector_1/name’, ‘BackCSPAD’)</p> <p>f1.initialize_stacks() f2.initialize_stacks()</p> <p>a = numpy.random.rand(2, 2) @@ -173,6 +173,8 @@ f2.append_data_to_stack(‘detector2’, b)</p> f2.append_data_to_stack(‘counter2’, c2)</p> <p>f1.write_stack_slice_and_increment() f2.write_stack_slice_and_increment()</p> +<p>f1.create_link(‘detectorname1’, ‘/name’) +f2.create_link(‘detectorname2’, ‘/name’)</p> <p>f1.close_file() f2.close_file()</p> <dl class="method"> @@ -237,6 +239,29 @@ the write_slice_and_increment.</p> <p>Closes the file for writing, ending all writing operations.</p> </dd></dl> +<dl class="method"> +<dt id="cfelpyutils.cfel_cxi.CXIWriter.create_link"> +<code class="descname">create_link</code><span class="sig-paren">(</span><em>name</em>, <em>path</em>, <em>overwrite=False</em><span class="sig-paren">)</span><a class="headerlink" href="#cfelpyutils.cfel_cxi.CXIWriter.create_link" title="Permalink to this definition">¶</a></dt> +<dd><p>Creates a link to a stack or entry.</p> +<p>Creates a link in the file, at the path specified, pointing to the stack or the entry identified by the +provided name. If a link or entry already exists at the specified path, it is deleted and replaced only if the +value of the overwrite parameter is True.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>name</strong> (<em>str</em>) – name of the stack or entry to which the link points.</li> +<li><strong>path</strong> (<em>str</em>) – path in the hdf5 where the link is created.</li> +<li><strong>overwrite</strong> (<em>bool</em>) – if set to True, an entry already existing at the same location will be overwritten. If set</li> +<li><strong>False</strong><strong>, </strong><strong>an attempt to overwrite an entry will raise an error.</strong> (<em>to</em>) – </li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + <dl class="method"> <dt id="cfelpyutils.cfel_cxi.CXIWriter.get_file_handle"> <code class="descname">get_file_handle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cfelpyutils.cfel_cxi.CXIWriter.get_file_handle" title="Permalink to this definition">¶</a></dt> @@ -265,15 +290,17 @@ stacks can be added to the CXI Writer after initialization.</p> <dl class="method"> <dt id="cfelpyutils.cfel_cxi.CXIWriter.write_simple_entry"> -<code class="descname">write_simple_entry</code><span class="sig-paren">(</span><em>path</em>, <em>data</em>, <em>overwrite=False</em><span class="sig-paren">)</span><a class="headerlink" href="#cfelpyutils.cfel_cxi.CXIWriter.write_simple_entry" title="Permalink to this definition">¶</a></dt> +<code class="descname">write_simple_entry</code><span class="sig-paren">(</span><em>name</em>, <em>path</em>, <em>data</em>, <em>overwrite=False</em><span class="sig-paren">)</span><a class="headerlink" href="#cfelpyutils.cfel_cxi.CXIWriter.write_simple_entry" title="Permalink to this definition">¶</a></dt> <dd><p>Writes a simple, non-stack entry in the file.</p> <p>Writes a simple, non-stack entry in the file, at the specified path. A simple entry can be written at all times, -before or after the stack initialization.</p> +before or after the stack initialization. THe user must provide a name that identifies the entry for further +operations (for example, creating a link).</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>name</strong> (<em>str</em>) – entry name</li> <li><strong>path</strong> (<em>str</em>) – path in the hdf5 file where the entry will be written.</li> <li><strong></strong><strong>(</strong><strong>Union</strong> (<em>data</em>) – numpy.ndarray, str, int, float): data to write</li> <li><strong>overwrite</strong> (<em>bool</em>) – if set to True, an entry already existing at the same location will be overwritten. If set</li> diff --git a/doc/build/html/genindex.html b/doc/build/html/genindex.html index 47fda0ca21f87be7545c690be6489ed021546e47..32f0bac53fa8f703cebe2a318226b439f18be072 100644 --- a/doc/build/html/genindex.html +++ b/doc/build/html/genindex.html @@ -123,6 +123,8 @@ <li><a href="cfelpyutils.html#module-cfelpyutils.cfel_psana">cfelpyutils.cfel_psana (module)</a> </li> <li><a href="cfelpyutils.html#cfelpyutils.cfel_cxi.CXIWriter.close_file">close_file() (cfelpyutils.cfel_cxi.CXIWriter method)</a> +</li> + <li><a href="cfelpyutils.html#cfelpyutils.cfel_cxi.CXIWriter.create_link">create_link() (cfelpyutils.cfel_cxi.CXIWriter method)</a> </li> <li><a href="cfelpyutils.html#cfelpyutils.cfel_cxi.CXIWriter">CXIWriter (class in cfelpyutils.cfel_cxi)</a> </li> diff --git a/doc/build/html/objects.inv b/doc/build/html/objects.inv index 6de1c8cb9adcb25cc66471633eab7df221f4884f..4f56f0849919d1db670dbdd65f15d86fa81f0280 100644 Binary files a/doc/build/html/objects.inv and b/doc/build/html/objects.inv differ diff --git a/doc/build/html/searchindex.js b/doc/build/html/searchindex.js index 6de89ba88616fb47ba0b9f042813f1ba60bb5e1a..6589a4cede487aa54871ec8e9459008d42c24759 100644 --- a/doc/build/html/searchindex.js +++ b/doc/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["cfelpyutils","index","modules"],envversion:51,filenames:["cfelpyutils.rst","index.rst","modules.rst"],objects:{"":{cfelpyutils:[0,0,0,"-"]},"cfelpyutils.cfel_crystfel":{load_crystfel_geometry:[0,1,1,""]},"cfelpyutils.cfel_cxi":{CXIWriter:[0,2,1,""]},"cfelpyutils.cfel_cxi.CXIWriter":{add_stack_to_writer:[0,3,1,""],append_data_to_stack:[0,3,1,""],close_file:[0,3,1,""],get_file_handle:[0,3,1,""],initialize_stacks:[0,3,1,""],write_simple_entry:[0,3,1,""],write_stack_slice_and_increment:[0,3,1,""]},"cfelpyutils.cfel_fabio":{read_cbf_from_stream:[0,1,1,""]},"cfelpyutils.cfel_geom":{apply_geometry_from_file:[0,1,1,""],apply_geometry_from_pixel_maps:[0,1,1,""],pixel_maps_for_image_view:[0,1,1,""],pixel_maps_from_geometry_file:[0,1,1,""]},"cfelpyutils.cfel_hdf5":{load_nparray_from_hdf5_file:[0,1,1,""]},"cfelpyutils.cfel_optarg":{parse_parameters:[0,1,1,""]},"cfelpyutils.cfel_psana":{dirname_from_source_runs:[0,1,1,""],psana_event_inspection:[0,1,1,""],psana_obj_from_string:[0,1,1,""]},cfelpyutils:{cfel_crystfel:[0,0,0,"-"],cfel_cxi:[0,0,0,"-"],cfel_fabio:[0,0,0,"-"],cfel_geom:[0,0,0,"-"],cfel_hdf5:[0,0,0,"-"],cfel_optarg:[0,0,0,"-"],cfel_psana:[0,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method"},terms:{"boolean":0,"case":0,"class":0,"default":0,"float":0,"function":0,"import":0,"int":0,"new":0,"return":0,"true":0,For:0,Its:0,The:0,Use:0,about:0,access:0,accord:0,across:0,add:0,add_stack_to_writ:0,added:0,adher:0,after:0,again:0,against:0,all:0,allow:0,allowa:0,alreadi:0,also:0,amost:0,ani:0,anoth:0,api:0,appear:0,append:0,append_data_to_stack:0,appli:0,apply_geometry_from_fil:0,apply_geometry_from_pixel_map:0,argument:0,arrai:0,assign:0,attempt:0,attribut:0,automat:0,axes:0,backcspad:0,base:0,beam:0,been:0,befor:0,block:0,bool:0,brace:0,bracket:0,buffer:0,build:0,can:0,cannot:0,cbf_obj:0,cbfimag:0,center:0,cfel:0,cfel_crystfel:2,cfel_cxi:2,cfel_fabio:2,cfel_geom:2,cfel_hdf5:2,cfel_optarg:2,cfel_psana:2,cfelfabio:0,cfelgeom:0,cfelhdf5:0,cfeloptarg:0,cfelpsana:0,chang:0,characterist:0,check:0,choic:0,chuck:0,chunk:0,chunk_siz:0,close:0,close_fil:0,command:0,compress:0,comput:0,config:0,configpars:0,configur:0,contain:0,content:[1,2],convers:0,convert:0,coordin:0,corner:0,correct:0,count:0,counter1:0,counter2:0,cours:0,cover:0,creat:0,crystfel:0,crystfel_geometri:0,cxi:0,cxidb:0,cxiwrit:0,cxix:0,data:0,data_as_slab:0,data_filenam:0,data_group:0,defin:0,describ:0,detector1:0,detector2:0,detector:0,detector_1:0,determin:0,dict:0,dictionari:0,directori:0,dirnam:0,dirname_from_source_run:0,distanc:0,document:0,doubl:0,dtype:0,dure:0,each:0,end:0,ensur:0,entri:0,entry_1:0,error:0,etc:0,event:0,exampl:0,exist:0,exp:0,expand:0,extract:0,fabio:0,fals:0,file:0,filenam:0,first:0,fix:0,fnam:0,follow:0,form:0,format:0,frame:0,from:0,frontcspad:0,full:0,gener:0,geometri:0,geometry_filenam:0,get:0,get_detector_geometry_2:0,get_file_handl:0,h5py:0,handl:0,has:0,hdf5:0,hold:0,html:0,http:0,identifi:0,im_out:0,imag:0,imageview:0,img_shap:0,implement:0,index:1,inform:0,initi:0,initial_data:0,initialize_stack:0,input:0,inspect:0,instanc:0,instanti:0,instead:0,integ:0,interact:0,intern:0,interoper:0,interpret:0,keep:0,kei:0,layout:0,left:0,level:0,like:0,line:0,list:0,load:0,load_crystfel_geometri:0,load_nparray_from_hdf5_fil:0,locat:0,low:0,make:0,manag:0,mani:0,manual:0,map:0,match:0,max_num_slic:0,miss:0,mod:0,modul:[1,2],monitor_param:0,more:0,multi:0,must:0,nake:0,name:0,ndarrai:0,need:0,never:0,next:0,non:0,none:0,nonetyp:0,normal:0,nparrai:0,number:0,number_of_entri:0,numpi:0,object:0,onc:0,one:0,onli:0,open:0,oper:0,option:0,order:0,org:0,origin:0,out:0,output:0,overwrit:0,overwritten:0,own:0,p11:0,packag:2,page:1,paramet:0,pars:0,parse_paramet:0,parser:0,path:0,payload:0,petraiii:0,physic:0,pixel:0,pixel_maps_for_image_view:0,pixel_maps_from_geometry_fil:0,point:0,prefix:0,previou:0,print:0,process:0,project:0,provid:0,psana:0,psana_event_inspect:0,psana_obj_from_str:0,pyqtgraph:0,python:0,quot:0,rai:0,rais:0,rand:0,random:0,rang:[],rawconfigpars:0,read:0,read_cbf_from_stream:0,receiv:0,refer:0,reimplement:0,relev:0,represent:0,reset:0,respect:0,risk:0,rule:0,same:0,search:1,see:0,sender:0,set:0,sever:0,shape:0,simpl:0,singl:0,size:0,slab:0,slab_shap:0,slice:0,softwar:0,sourc:0,specifi:0,squar:0,stack:0,start:0,str:0,stream:0,string:0,structur:0,style:0,subdirectori:0,submodul:2,subsequ:0,succe:0,sure:0,sync:0,synchron:0,system:0,take:0,test1:0,test2:0,tfel:0,than:0,thei:0,them:0,thi:0,time:0,top:0,tri:0,tupl:0,turn:0,type:0,uncorrect:0,union:0,unless:0,usag:0,use:0,used:0,user:0,using:0,util:0,valid:0,valu:0,verbatim:0,visual:0,wai:0,want:0,what:0,where:0,which:0,widget:0,without:0,word:0,work:0,write:0,write_simple_entri:0,write_slice_and_incr:0,write_stack_slice_and_incr:0,writer:0,written:0,www:0,your:0},titles:["cfelpyutils package","Welcome to cfelpyutils’s documentation!","cfelpyutils"],titleterms:{cfel_crystfel:0,cfel_cxi:0,cfel_fabio:0,cfel_geom:0,cfel_hdf5:0,cfel_optarg:0,cfel_psana:0,cfelfabio:[],cfelgeom:[],cfelhdf5:[],cfeloptarg:[],cfelpsana:[],cfelpyutil:[0,1,2],content:0,document:1,indic:1,modul:0,packag:0,submodul:0,tabl:1,welcom:1}}) \ No newline at end of file +Search.setIndex({docnames:["cfelpyutils","index","modules"],envversion:51,filenames:["cfelpyutils.rst","index.rst","modules.rst"],objects:{"":{cfelpyutils:[0,0,0,"-"]},"cfelpyutils.cfel_crystfel":{load_crystfel_geometry:[0,1,1,""]},"cfelpyutils.cfel_cxi":{CXIWriter:[0,2,1,""]},"cfelpyutils.cfel_cxi.CXIWriter":{add_stack_to_writer:[0,3,1,""],append_data_to_stack:[0,3,1,""],close_file:[0,3,1,""],create_link:[0,3,1,""],get_file_handle:[0,3,1,""],initialize_stacks:[0,3,1,""],write_simple_entry:[0,3,1,""],write_stack_slice_and_increment:[0,3,1,""]},"cfelpyutils.cfel_fabio":{read_cbf_from_stream:[0,1,1,""]},"cfelpyutils.cfel_geom":{apply_geometry_from_file:[0,1,1,""],apply_geometry_from_pixel_maps:[0,1,1,""],pixel_maps_for_image_view:[0,1,1,""],pixel_maps_from_geometry_file:[0,1,1,""]},"cfelpyutils.cfel_hdf5":{load_nparray_from_hdf5_file:[0,1,1,""]},"cfelpyutils.cfel_optarg":{parse_parameters:[0,1,1,""]},"cfelpyutils.cfel_psana":{dirname_from_source_runs:[0,1,1,""],psana_event_inspection:[0,1,1,""],psana_obj_from_string:[0,1,1,""]},cfelpyutils:{cfel_crystfel:[0,0,0,"-"],cfel_cxi:[0,0,0,"-"],cfel_fabio:[0,0,0,"-"],cfel_geom:[0,0,0,"-"],cfel_hdf5:[0,0,0,"-"],cfel_optarg:[0,0,0,"-"],cfel_psana:[0,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method"},terms:{"boolean":0,"case":0,"class":0,"default":0,"float":0,"function":0,"import":0,"int":0,"new":0,"return":0,"true":0,For:0,Its:0,THe:0,The:0,Use:0,about:0,access:0,accord:0,across:0,add:0,add_stack_to_writ:0,added:0,adher:0,after:0,again:0,against:0,all:0,allow:0,allowa:0,alreadi:0,also:0,amost:0,ani:0,anoth:0,api:0,appear:0,append:0,append_data_to_stack:0,appli:0,apply_geometry_from_fil:0,apply_geometry_from_pixel_map:0,argument:0,arrai:0,assign:0,attempt:0,attribut:0,automat:0,axes:0,backcspad:0,base:0,beam:0,been:0,befor:0,block:0,bool:0,brace:0,bracket:0,buffer:0,build:0,can:0,cannot:0,cbf_obj:0,cbfimag:0,center:0,cfel:0,cfel_crystfel:2,cfel_cxi:2,cfel_fabio:2,cfel_geom:2,cfel_hdf5:2,cfel_optarg:2,cfel_psana:2,cfelfabio:0,cfelgeom:0,cfelhdf5:0,cfeloptarg:0,cfelpsana:0,chang:0,characterist:0,check:0,choic:0,chuck:0,chunk:0,chunk_siz:0,close:0,close_fil:0,command:0,compress:0,comput:0,config:0,configpars:0,configur:0,contain:0,content:[1,2],convers:0,convert:0,coordin:0,corner:0,correct:0,count:0,counter1:0,counter2:0,cours:0,cover:0,creat:0,create_link:0,crystfel:0,crystfel_geometri:0,cxi:0,cxidb:0,cxiwrit:0,cxix:0,data:0,data_as_slab:0,data_filenam:0,data_group:0,defin:0,delet:0,describ:0,detector1:0,detector2:0,detector:0,detector_1:0,detectorname1:0,detectorname2:0,determin:0,dict:0,dictionari:0,directori:0,dirnam:0,dirname_from_source_run:0,distanc:0,document:0,doubl:0,dtype:0,dure:0,each:0,end:0,ensur:0,entri:0,entry_1:0,error:0,etc:0,event:0,exampl:0,exist:0,exp:0,expand:0,extract:0,fabio:0,fals:0,file:0,filenam:0,first:0,fix:0,fnam:0,follow:0,form:0,format:0,frame:0,from:0,frontcspad:0,full:0,further:0,gener:0,geometri:0,geometry_filenam:0,get:0,get_detector_geometry_2:0,get_file_handl:0,h5py:0,handl:0,has:0,hdf5:0,hold:0,html:0,http:0,identifi:0,im_out:0,imag:0,imageview:0,img_shap:0,implement:0,index:1,inform:0,initi:0,initial_data:0,initialize_stack:0,input:0,inspect:0,instanc:0,instanti:0,instead:0,integ:0,interact:0,intern:0,interoper:0,interpret:0,keep:0,kei:0,layout:0,left:0,level:0,like:0,line:0,link:0,list:0,load:0,load_crystfel_geometri:0,load_nparray_from_hdf5_fil:0,locat:0,low:0,make:0,manag:0,mani:0,manual:0,map:0,match:0,max_num_slic:0,miss:0,mod:0,modul:[1,2],monitor_param:0,more:0,multi:0,must:0,nake:0,name:0,ndarrai:0,need:0,never:0,next:0,non:0,none:0,nonetyp:0,normal:0,nparrai:0,number:0,number_of_entri:0,numpi:0,object:0,onc:0,one:0,onli:0,open:0,oper:0,option:0,order:0,org:0,origin:0,out:0,output:0,overwrit:0,overwritten:0,own:0,p11:0,packag:2,page:1,paramet:0,pars:0,parse_paramet:0,parser:0,path:0,payload:0,petraiii:0,physic:0,pixel:0,pixel_maps_for_image_view:0,pixel_maps_from_geometry_fil:0,point:0,prefix:0,previou:0,print:0,process:0,project:0,provid:0,psana:0,psana_event_inspect:0,psana_obj_from_str:0,pyqtgraph:0,python:0,quot:0,rai:0,rais:0,rand:0,random:0,rang:[],rawconfigpars:0,read:0,read_cbf_from_stream:0,receiv:0,refer:0,reimplement:0,relev:0,replac:0,represent:0,reset:0,respect:0,risk:0,rule:0,same:0,search:1,see:0,sender:0,set:0,sever:0,shape:0,simpl:0,singl:0,size:0,slab:0,slab_shap:0,slice:0,softwar:0,sourc:0,specifi:0,squar:0,stack:0,start:0,str:0,stream:0,string:0,structur:0,style:0,subdirectori:0,submodul:2,subsequ:0,succe:0,sure:0,sync:0,synchron:0,system:0,take:0,test1:0,test2:0,tfel:0,than:0,thei:0,them:0,thi:0,time:0,top:0,tri:0,tupl:0,turn:0,type:0,uncorrect:0,union:0,unless:0,usag:0,use:0,used:0,user:0,using:0,util:0,valid:0,valu:0,verbatim:0,visual:0,wai:0,want:0,what:0,where:0,which:0,widget:0,without:0,word:0,work:0,write:0,write_simple_entri:0,write_slice_and_incr:0,write_stack_slice_and_incr:0,writer:0,written:0,www:0,your:0},titles:["cfelpyutils package","Welcome to cfelpyutils’s documentation!","cfelpyutils"],titleterms:{cfel_crystfel:0,cfel_cxi:0,cfel_fabio:0,cfel_geom:0,cfel_hdf5:0,cfel_optarg:0,cfel_psana:0,cfelfabio:[],cfelgeom:[],cfelhdf5:[],cfeloptarg:[],cfelpsana:[],cfelpyutil:[0,1,2],content:0,document:1,indic:1,modul:0,packag:0,submodul:0,tabl:1,welcom:1}}) \ No newline at end of file