diff --git a/cfel_cxi.py b/cfel_cxi.py index 9e196d3cbeaab4bf666dade7360585861a45b0e9..e919457fcd32ac78c71730d343075e9d654aec42 100644 --- a/cfel_cxi.py +++ b/cfel_cxi.py @@ -435,6 +435,18 @@ class CXIWriter: return self._fh + def are_stacks_initialized(self): + """Checks if stacks are initialized. + + Checks the status of the stacks in the file and returns the status to the user. + + Returns: + + status (bool): True if the stacks are initialized, False otherwise + """ + + return self._initialized + def close_file(self): """Closes the file. diff --git a/doc/build/doctrees/cfelpyutils.doctree b/doc/build/doctrees/cfelpyutils.doctree index 447fe6ec10ac30061864de9f704d06aa8556093d..d967c728cfd7d53ae959dee4d50bed52145a9795 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 fa918e092bdeb8c07df61a429b0460a5cb092da8..51792dd7586d708c0d0c6c862b66cdc94ca88df0 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 fba5fea547f35b2643ff95e7ac1a28fa7239c9be..d539a01d8a5e32c31ac986175c316005936467b0 100644 --- a/doc/build/html/cfelpyutils.html +++ b/doc/build/html/cfelpyutils.html @@ -232,6 +232,23 @@ the write_slice_and_increment.</p> </table> </dd></dl> +<dl class="method"> +<dt id="cfelpyutils.cfel_cxi.CXIWriter.are_stacks_initialized"> +<code class="descname">are_stacks_initialized</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cfelpyutils.cfel_cxi.CXIWriter.are_stacks_initialized" title="Permalink to this definition">¶</a></dt> +<dd><p>Checks if stacks are initialized.</p> +<p>Checks the status of the stacks in the file and returns the status to the user.</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">Returns:</th><td class="field-body">True if the stacks are initialized, False otherwise</td> +</tr> +<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">status (bool)</td> +</tr> +</tbody> +</table> +</dd></dl> + <dl class="method"> <dt id="cfelpyutils.cfel_cxi.CXIWriter.close_file"> <code class="descname">close_file</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cfelpyutils.cfel_cxi.CXIWriter.close_file" title="Permalink to this definition">¶</a></dt> diff --git a/doc/build/html/genindex.html b/doc/build/html/genindex.html index 32f0bac53fa8f703cebe2a318226b439f18be072..c7e545d9768d1a35d0b8b729dde97507b4de20dd 100644 --- a/doc/build/html/genindex.html +++ b/doc/build/html/genindex.html @@ -97,6 +97,8 @@ <li><a href="cfelpyutils.html#cfelpyutils.cfel_geom.apply_geometry_from_file">apply_geometry_from_file() (in module cfelpyutils.cfel_geom)</a> </li> <li><a href="cfelpyutils.html#cfelpyutils.cfel_geom.apply_geometry_from_pixel_maps">apply_geometry_from_pixel_maps() (in module cfelpyutils.cfel_geom)</a> +</li> + <li><a href="cfelpyutils.html#cfelpyutils.cfel_cxi.CXIWriter.are_stacks_initialized">are_stacks_initialized() (cfelpyutils.cfel_cxi.CXIWriter method)</a> </li> </ul></td> </tr></table> diff --git a/doc/build/html/objects.inv b/doc/build/html/objects.inv index 4f56f0849919d1db670dbdd65f15d86fa81f0280..f75d756117de0f5576e92705d354a4cf0587a38e 100644 --- a/doc/build/html/objects.inv +++ b/doc/build/html/objects.inv @@ -2,10 +2,7 @@ # Project: cfelpyutils # Version: 0.5 # The remainder of this file is compressed using zlib. -xÚ–±ŽÜ †û} -¢‹”j\‘æÚTWDŠ”âÒ¡YÛ“`@€ïÖyúÆ»ÞÓnsx„æãg†Yµhü4&2Qøéipz4(¾ -µÚ›> 桬ì?‹ýîr-Ï¥ -SL<ÙNhŒ}þ’ºS˜2¸Jä¬x¼Fßfiƒ #5ß?¿J2Fˆñ#g¯î h-cõW&'ßÎH¾Zït-Ó{´ZjH©3~3TQ¶ÄñÚŒ - ¥!»]V‡i%{°úÚÈR"0ôKÜâfâœTið¬íòdM4¤Pòå%YìÀ'Tð[8«/‰Ù½á´rZÙ7°<þªÊ3×v½˜ìkÀLç&Qo•ž›DOG^ÀÇzîÊ’èP¾¾Ý™e®¢k#Ðëö[}F²wißÖC°D/›ë%9Ÿ tõ¢ŠÃ‚¸¯ñ"u‰ô,ÔK™ÝMÁ²ˆ¥zܸ®Ãh7(jæQâ+7nÑclºÃŸs“í>È1é'í”Ø_ï½4Ïý‹aס%«ñ8;8ðß»ž¬Åï9Ow붅±ãâ2É]ò% -Þ:æ¶ Yÿ§'êÆi~ÚŸ -îGÉt9·$÷ÝÍÓÕv!¨þ=½ØÊÞ_eýg¾ùœ¾†+ \ No newline at end of file +xÚ–±ŽÛ0†÷<…Š+Ð)Foèrk§ +èpÝF¢m¶²$Hò]ܧ/e9qÉrrC¦ÄO?I“‰jÑøiLd¢ðÓÓàôhP|jµ7}ÌCÙÙûÝå^^K¦˜x±Ðúü&;t¦0ep;Z•ÈYñx¾Í<ÒAGj¾ÿ~~ ”0dŒ2ãGî^ÝÐZÆê¯LN¾‘Zït-Ó{´ZjH©3~;4`!EI–¡¨7c•qeK\†Í¨€P²Û£í0Í¢dVßAÛš²%‰›‰ó·"# žU¢]:áÈùkŒ†Jž«Í‰ø† +~rõ6»7\VîûC+Ûà–ÇïCU×ç‘Q/&{çÖ2ÓyöE§·JÏM¢§#oàc=weÈÖIt(_ ßîƒÌ2Wѵèuû¾"Ù»ü*X!À’½l®—ä|‚ÐÕ‹*þ â¹ÆOàa¨+¤`¡^ÊìÞh +–E,ÝãÆÀ}F»AQ3?%¾òPàñ=ÈV ;ü9÷8Ùîƒ<“~ÒN‰ýõÙKƒð<߸vZ²³£ÿIaדµø=çån=¶ð/N¼ QÜ"¹ËK¾DÁGÇ<6!ëÿ´ãBݸÍOûÓFÁý(•.÷–⾋l1]Eµ‹AõïéÅVÎþ*û?säÿÄÖ¦† \ No newline at end of file diff --git a/doc/build/html/searchindex.js b/doc/build/html/searchindex.js index 6589a4cede487aa54871ec8e9459008d42c24759..ae3b77f738d3287d25b44436485d99e21f3213c2 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,""],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 +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,""],are_stacks_initialized:[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,are_stacks_initi: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,otherwis: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,statu: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