@@ -706,52 +706,52 @@ def applyFiltering(self, iCol, options, bAdd=True):
706
706
return df_new , name_new
707
707
708
708
709
- def radialAvg (self , avgMethod , avgParam ):
710
- # TODO make this a pluggin
711
- import pydatview .fast .postpro as fastlib
712
- import pydatview .fast .fastfarm as fastfarm
713
- df = self .data
714
- base ,out_ext = os .path .splitext (self .filename )
715
-
716
- # TODO use fast_output_file findDriverFile
717
-
718
- # --- Detect if it's a FAST Farm file
719
- sCols = '' .join (df .columns )
720
- if sCols .find ('WkDf' )> 1 or sCols .find ('CtT' )> 0 :
721
- # --- FAST FARM files
722
- Files = [base + ext for ext in ['.fstf' ,'.FSTF' ,'.Fstf' ,'.fmas' ,'.FMAS' ,'.Fmas' ] if os .path .exists (base + ext )]
723
- if len (Files )== 0 :
724
- fst_in = None
725
- #raise Exception('Error: No .fstf file found with name: '+base+'.fstf')
726
- else :
727
- fst_in = Files [0 ]
728
-
729
- dfRad ,_ ,dfDiam = fastfarm .spanwisePostProFF (fst_in ,avgMethod = avgMethod ,avgParam = avgParam ,D = 1 ,df = df )
730
- dfs_new = [dfRad ,dfDiam ]
731
- names_new = [self .raw_name + '_rad' ,self .raw_name + '_diam' ]
732
- else :
733
- # --- FAST files
734
-
735
- # HACK for AD file to find the right .fst file
736
- iDotAD = base .lower ().find ('.ad' )
737
- if iDotAD > 1 :
738
- base = base [:iDotAD ]
739
- #
740
- Files = [base + ext for ext in ['.fst' ,'.FST' ,'.Fst' ,'.dvr' ,'.Dvr' ,'.DVR' ] if os .path .exists (base + ext )]
741
- if len (Files )== 0 :
742
- fst_in = None
743
- #raise Exception('Error: No .fst file found with name: '+base+'.fst')
744
- else :
745
- fst_in = Files [0 ]
746
-
747
- out = fastlib .spanwisePostPro (fst_in , avgMethod = avgMethod , avgParam = avgParam , out_ext = out_ext , df = self .data )
748
- dfRadED = out ['ED_bld' ]; dfRadAD = out ['AD' ]; dfRadBD = out ['BD' ]
749
-
750
- dfs_new = [dfRadAD , dfRadED , dfRadBD ]
751
- names_new = [self .raw_name + '_AD' , self .raw_name + '_ED' , self .raw_name + '_BD' ]
752
- if all (df is None for df in dfs_new ):
753
- raise PyDatViewException ('No OpenFAST radial data found for table: ' + self .nickname )
754
- return dfs_new , names_new
709
+ # def radialAvg(self, avgMethod, avgParam):
710
+ # # TODO make this a pluggin
711
+ # import pydatview.fast.postpro as fastlib
712
+ # import pydatview.fast.fastfarm as fastfarm
713
+ # df = self.data
714
+ # base,out_ext = os.path.splitext(self.filename)
715
+ #
716
+ # # TODO use fast_output_file findDriverFile
717
+ #
718
+ # # --- Detect if it's a FAST Farm file
719
+ # sCols = ''.join(df.columns)
720
+ # if sCols.find('WkDf')>1 or sCols.find('CtT')>0:
721
+ # # --- FAST FARM files
722
+ # Files=[base+ext for ext in ['.fstf','.FSTF','.Fstf','.fmas','.FMAS','.Fmas'] if os.path.exists(base+ext)]
723
+ # if len(Files)==0:
724
+ # fst_in=None
725
+ # #raise Exception('Error: No .fstf file found with name: '+base+'.fstf')
726
+ # else:
727
+ # fst_in=Files[0]
728
+ #
729
+ # dfRad,_,dfDiam = fastfarm.spanwisePostProFF(fst_in,avgMethod=avgMethod,avgParam=avgParam,D=1,df=df)
730
+ # dfs_new = [dfRad,dfDiam]
731
+ # names_new=[self.raw_name+'_rad',self.raw_name+'_diam']
732
+ # else:
733
+ # # --- FAST files
734
+ #
735
+ # # HACK for AD file to find the right .fst file
736
+ # iDotAD=base.lower().find('.ad')
737
+ # if iDotAD>1:
738
+ # base=base[:iDotAD]
739
+ # #
740
+ # Files=[base+ext for ext in ['.fst','.FST','.Fst','.dvr','.Dvr','.DVR'] if os.path.exists(base+ext)]
741
+ # if len(Files)==0:
742
+ # fst_in=None
743
+ # #raise Exception('Error: No .fst file found with name: '+base+'.fst')
744
+ # else:
745
+ # fst_in=Files[0]
746
+ #
747
+ # out= fastlib.spanwisePostPro(fst_in, avgMethod=avgMethod, avgParam=avgParam, out_ext=out_ext, df = self.data)
748
+ # dfRadED=out['ED_bld']; dfRadAD = out['AD']; dfRadBD = out['BD']
749
+ #
750
+ # dfs_new = [dfRadAD, dfRadED, dfRadBD]
751
+ # names_new=[self.raw_name+'_AD', self.raw_name+'_ED', self.raw_name+'_BD']
752
+ # if all(df is None for df in dfs_new):
753
+ # raise PyDatViewException('No OpenFAST radial data found for table: '+self.nickname)
754
+ # return dfs_new, names_new
755
755
756
756
def changeUnits (self , data = None ):
757
757
""" Change units of the table """
0 commit comments