def get_ciCALData_fields(numofarms): ciCALData_fields = FieldList() for i in range(numofarms): CAL = Field(2031) CAL.set_abbreviation('CAL' + str(i + 1)) ciCALData_fields.append(CAL) return ciCALData_fields
def get_ssNextSpacing_fields(): Spacing = Field(2061) Spacing.set_representation('Next stage spacing') ssNextSpacing_fields = FieldList() ssNextSpacing_fields.append(Spacing) return ssNextSpacing_fields
def get_osaCasing_fields(): OD = Field(2030) ID = Field(2031) Weight = Field(2032) Density = Field(2039) E = Field(2040) osaCasing_fields = FieldList() osaCasing_fields.append(OD) osaCasing_fields.append(ID) osaCasing_fields.append(Weight) osaCasing_fields.append(Density) osaCasing_fields.append(E) return osaCasing_fields
def get_siSurveyData_fields(): MD = Field(2001, altBg=True, altFg=True) Inc = Field(2002, altBg=True, altFg=True) Azi = Field(2003, altBg=True, altFg=True) siSurveyData_fields = FieldList() siSurveyData_fields.append(MD) siSurveyData_fields.append(Inc) siSurveyData_fields.append(Azi) return siSurveyData_fields
def get_csvCal_fields(): MDtop = Field(2001) MDbot = Field(2001) HID = Field(2031) MD = Field(2001) MDtop.set_abbreviation('MDtop') MDbot.set_abbreviation('MDbot') HID.set_abbreviation('HID') MDtop.set_representation('top MD') MDbot.set_representation('bottom MD') HID.set_representation('Hole ID') csvCal_fields = FieldList() csvCal_fields.append(MDtop) csvCal_fields.append(MDbot) csvCal_fields.append(HID) csvCal_fields.append(MD) return csvCal_fields
def get_ciLASData_fields(): MD = Field(2001) CD = Field(2030) MDs = Field(2001) MDs.set_abbreviation('selectedMD') CD.set_abbreviation('CD') ciLASData_fields = FieldList() ciLASData_fields.append(MD) ciLASData_fields.append(CD) ciLASData_fields.append(MDs) return ciLASData_fields
def get_osaWellbore_fields(): HoleID = Field(2010) MaxSpan = Field(2061) MudIPDensity = Field(2077) MudOPDensity = Field(2077) HoleID.set_representation('Hole ID') HoleID.set_abbreviation('HoleID') MaxSpan.set_representation('Max span') MaxSpan.set_abbreviation('MaxSpan') MudIPDensity.set_representation('Mud inside pipe') MudIPDensity.set_abbreviation('MudIPDensity') MudOPDensity.set_representation('Mud in annulus') MudOPDensity.set_abbreviation('MudOPDensity') osaWellbore_fields = FieldList() osaWellbore_fields.append(HoleID) osaWellbore_fields.append(MaxSpan) osaWellbore_fields.append(MudIPDensity) osaWellbore_fields.append(MudOPDensity) return osaWellbore_fields
def get_osaOutputdata2_fields(): axialForce = Field(2075, altBg=True, altFg=True) deflection = Field(2076, altBg=True, altFg=True) wClearance = Field(2073, altBg=True, altFg=True) wStandoff = Field(2078, altBg=True, altFg=True) axialForce.set_representation('Axial extra force @ top') axialForce.set_abbreviation('AxialForce') deflection.set_representation('Max. pipe deflection') deflection.set_abbreviation('MaxDeflection') wClearance.set_representation('Mean wellbore clearance') wClearance.set_abbreviation('WellboreClearance') wStandoff.set_representation('Mean wellbore standoff') wStandoff.set_abbreviation('WellboreStandoff') osaOutputdata2_fields = FieldList() osaOutputdata2_fields.append(axialForce) osaOutputdata2_fields.append(deflection) osaOutputdata2_fields.append(wClearance) osaOutputdata2_fields.append(wStandoff) return osaOutputdata2_fields
def get_csvCaliperReport_fields(): Desc = Field(2055, altBg=True, altFg=True) mHID = Field(2031, altBg=True, altFg=True) #ID MDbot = Field(2001, altBg=True, altFg=True) MDtop = Field(2001, altBg=True, altFg=True) MDbot.set_abbreviation('MDbot') MDtop.set_abbreviation('MDtop') csvCaliperReport_fields = FieldList() csvCaliperReport_fields.append(Desc) csvCaliperReport_fields.append(mHID) csvCaliperReport_fields.append(MDtop) csvCaliperReport_fields.append(MDbot) return csvCaliperReport_fields
def get_osaOutputdata1_fields(): clearanceA = Field(2073, altBg=True, altFg=True) clearanceB = Field(2073, altBg=True, altFg=True) clearanceM = Field(2073, altBg=True, altFg=True) sideForceA = Field(2074, altBg=True, altFg=True) sideForceB = Field(2074, altBg=True, altFg=True) sideForceM = Field(2074, altBg=True, altFg=True) standoffA = Field(2078, altBg=True, altFg=True) standoffB = Field(2078, altBg=True, altFg=True) standoffM = Field(2078, altBg=True, altFg=True) clearanceA.set_representation('Annular clearance @ cent. A') clearanceA.set_abbreviation('ClearanceA') clearanceB.set_representation('Annular clearance @ cent. B') clearanceB.set_abbreviation('ClearanceB') clearanceM.set_representation('Annular clearance @ mid span') clearanceM.set_abbreviation('ClearanceM') sideForceA.set_representation('Side force @ cent. A') sideForceA.set_abbreviation('SideForceA') sideForceB.set_representation('Side force @ cent. B') sideForceB.set_abbreviation('SideForceB') sideForceM.set_representation('Side force @ mid span') sideForceM.set_abbreviation('SideForceM') standoffA.set_representation('Standoff @ cent. A') standoffA.set_abbreviation('StandoffA') standoffB.set_representation('Standoff @ cent. B') standoffB.set_abbreviation('StandoffB') standoffM.set_representation('Standoff @ mid span') standoffM.set_abbreviation('StandoffM') osaOutputdata1_fields = FieldList() osaOutputdata1_fields.append(clearanceA) osaOutputdata1_fields.append(clearanceB) osaOutputdata1_fields.append(clearanceM) osaOutputdata1_fields.append(sideForceA) osaOutputdata1_fields.append(sideForceB) osaOutputdata1_fields.append(sideForceM) osaOutputdata1_fields.append(standoffA) osaOutputdata1_fields.append(standoffB) osaOutputdata1_fields.append(standoffM) return osaOutputdata1_fields
def get_osaCent_fields(): Type = Field(2049) IPOD = Field(2009) CentOD = Field(2011) #CentID = Field(2012) ResF_SO67 = Field(2018) minResF = Field(2017) SO_minResF = Field(2019) ResF_SO67.set_representation('Res. Force @ SO=67%') minResF.set_representation('minimum Res. Force') SO_minResF.set_representation('StandOff @ min. Res. F.') osaCent_fields = FieldList() osaCent_fields.append(Type) osaCent_fields.append(IPOD) osaCent_fields.append(CentOD) #osaCent_fields.append( CentID ) osaCent_fields.append(ResF_SO67) osaCent_fields.append(minResF) osaCent_fields.append(SO_minResF) return osaCent_fields
def get_TDB_fields(): query = """ select p.fieldID, u.representation from pipe_properties p left join units u on p.nativeUnitID=u.unitID where p.pipeID=(select distinct min(pipeID) from pipe_properties) """ items = dbUtils.execute_query(query) units = {} for item in items: units[item[0]] = item[1] ProdNumber = Field(2050, altBg=True, altFg=True) Type = Field(2049, altBg=True, altFg=True, mandatory=True) Vendor = Field(2051, altBg=True, altFg=True) Grade = Field(2052, altBg=True, altFg=True) Weight = Field(2032, altBg=True, altFg=True, mandatory=True) OD = Field(2030, altBg=True, altFg=True, mandatory=True) ID = Field(2031, altBg=True, altFg=True, mandatory=True) Drift = Field(2046, altBg=True, altFg=True, mandatory=True) Thickness = Field(2047, altBg=True, altFg=True) CrossSec = Field(2048, altBg=True, altFg=True) Density = Field(2039, altBg=True, altFg=True, mandatory=True) E = Field(2040, altBg=True, altFg=True, mandatory=True) v = Field(2041, altBg=True, altFg=True, mandatory=True) #FF = Field(2027, altBg=True, altFg=True, mandatory=True) Length = Field(2045, altBg=True, altFg=True, mandatory=True) YieldTen = Field(2034, altBg=True, altFg=True, mandatory=True) TYS = Field(2033, altBg=True, altFg=True, mandatory=True) UTS = Field(2035, altBg=True, altFg=True, mandatory=True) YieldTor = Field(2070, altBg=True, altFg=True, mandatory=True) SYS = Field(2069, altBg=True, altFg=True, mandatory=True) USS = Field(2068, altBg=True, altFg=True, mandatory=True) Collapse = Field(2036, altBg=True, altFg=True, mandatory=True) MaxIntP = Field(2037, altBg=True, altFg=True, mandatory=True) TestP = Field(2038, altBg=True, altFg=True) Upset = Field(2053, altBg=True, altFg=True) Connection = Field(2054, altBg=True, altFg=True) TJOD = Field(2042, altBg=True, altFg=True) TJID = Field(2043, altBg=True, altFg=True) TJL = Field(2044, altBg=True, altFg=True) Descript = Field(2055) PipeID = Field(2000) TDB_fields = FieldList() TDB_fields.append(ProdNumber) TDB_fields.append(Type) TDB_fields.append(Vendor) TDB_fields.append(Grade) TDB_fields.append(Weight) TDB_fields.append(OD) TDB_fields.append(ID) TDB_fields.append(Drift) TDB_fields.append(Thickness) TDB_fields.append(CrossSec) TDB_fields.append(Density) TDB_fields.append(E) TDB_fields.append(v) #TDB_fields.append( FF ) TDB_fields.append(Length) TDB_fields.append(YieldTen) TDB_fields.append(TYS) TDB_fields.append(UTS) TDB_fields.append(YieldTor) TDB_fields.append(SYS) TDB_fields.append(USS) TDB_fields.append(Collapse) TDB_fields.append(MaxIntP) TDB_fields.append(TestP) TDB_fields.append(Upset) TDB_fields.append(Connection) TDB_fields.append(TJOD) TDB_fields.append(TJID) TDB_fields.append(TJL) TDB_fields.append(Descript) TDB_fields.append(PipeID) for field in TDB_fields[:-2]: if units[field.id]: field.headerName = field.representation + ' [' + units[ field.id] + ']' field.unit = units[field.id] else: field.headerName = field.representation field.unit = None return TDB_fields
def get_ssCentralizerLocations_fields(): MD = Field(2001) Inc = Field(2002, altBg=True, altFg=True) SOatC = Field(2078, altBg=True, altFg=True) SOatM = Field(2078, altBg=True, altFg=True) ClatC = Field(2073, altBg=True, altFg=True) ClatM = Field(2073, altBg=True, altFg=True) """ hsMD = Field(2001) hsInc = Field(2002, altBg=True, altFg=True) hsSOatC = Field(2078, altBg=True, altFg=True) hsSOatM = Field(2078, altBg=True, altFg=True) hsClatC = Field(2073, altBg=True, altFg=True) hsClatM = Field(2073, altBg=True, altFg=True) dsMD = Field(2001) dsInc = Field(2002, altBg=True, altFg=True) dsSOatC = Field(2078, altBg=True, altFg=True) dsSOatM = Field(2078, altBg=True, altFg=True) dsClatC = Field(2073, altBg=True, altFg=True) dsClatM = Field(2073, altBg=True, altFg=True) """ EW = Field(2007, altBg=True, altFg=True) NS = Field(2006, altBg=True, altFg=True) TVD = Field(2004, altBg=True, altFg=True) DL = Field(2008, altBg=True, altFg=True) LatC = Field(2080, altBg=True, altFg=True) ID = Field(2031, altBg=True, altFg=True) SOatC.set_abbreviation('SOatC') SOatM.set_abbreviation('SOatM') ClatC.set_abbreviation('ClatC') ClatM.set_abbreviation('ClatM') LatC.set_abbreviation('LatC') """ hsMD.set_abbreviation('hsMD') hsInc.set_abbreviation('hsInc') hsSOatC.set_abbreviation('hsSOatC') hsSOatM.set_abbreviation('hsSOatM') hsClatC.set_abbreviation('hsClatC') hsClatM.set_abbreviation('hsClatM') dsMD.set_abbreviation('dsMD') dsInc.set_abbreviation('dsInc') dsSOatC.set_abbreviation('dsSOatC') dsSOatM.set_abbreviation('dsSOatM') dsClatC.set_abbreviation('dsClatC') dsClatM.set_abbreviation('dsClatM') """ SOatC.set_representation('<SO> @ centr.') SOatM.set_representation('SO @ mid span') ClatC.set_representation('<Cl> @ centr.') ClatM.set_representation('Cl @ mid span') ID.set_representation('Hole ID') ssCentralizerLocations_fields = FieldList() ssCentralizerLocations_fields.append(MD) ssCentralizerLocations_fields.append(Inc) ssCentralizerLocations_fields.append(SOatC) ssCentralizerLocations_fields.append(SOatM) ssCentralizerLocations_fields.append(ClatC) ssCentralizerLocations_fields.append(ClatM) """ ssCentralizerLocations_fields.append( hsMD ) ssCentralizerLocations_fields.append( hsInc ) ssCentralizerLocations_fields.append( hsSOatC ) ssCentralizerLocations_fields.append( hsSOatM ) ssCentralizerLocations_fields.append( hsClatC ) ssCentralizerLocations_fields.append( hsClatM ) ssCentralizerLocations_fields.append( dsMD ) ssCentralizerLocations_fields.append( dsInc ) ssCentralizerLocations_fields.append( dsSOatC ) ssCentralizerLocations_fields.append( dsSOatM ) ssCentralizerLocations_fields.append( dsClatC ) ssCentralizerLocations_fields.append( dsClatM ) """ ssCentralizerLocations_fields.append(EW) ssCentralizerLocations_fields.append(NS) ssCentralizerLocations_fields.append(TVD) ssCentralizerLocations_fields.append(DL) ssCentralizerLocations_fields.append(LatC) ssCentralizerLocations_fields.append(ID) return ssCentralizerLocations_fields
def get_CDBBowSpring_fields(): query = """ select c.fieldID, u.representation from centralizer_properties c left join units u on c.nativeUnitID=u.unitID where c.centralizerID=(select distinct min(centralizerID) from centralizer_properties where fieldID=2049 and valueRepresentation='Bow Spring') """ items = dbUtils.execute_query(query) ProdNumber = Field(2050, altBg=True, altFg=True) Type = Field(2049, altBg=True, altFg=True, mandatory=True) Vendor = Field(2051, altBg=True, altFg=True) IPOD = Field(2009, altBg=True, altFg=True, mandatory=True) OPID = Field(2010, altBg=True, altFg=True, mandatory=True) CentOD = Field(2011, altBg=True, altFg=True, mandatory=True) CentID = Field(2012, altBg=True, altFg=True, mandatory=True) Weight = Field(2013, altBg=True, altFg=True, mandatory=True) Length = Field(2014, altBg=True, altFg=True, mandatory=True) Bows = Field(2029, altBg=True, altFg=True, mandatory=True) StartingF = Field(2015, altBg=True, altFg=True, mandatory=True) RunningF = Field(2016, altBg=True, altFg=True, mandatory=True) MinRestF = Field(2017, altBg=True, altFg=True, mandatory=True) RestF_SO67 = Field(2018, altBg=True, altFg=True, mandatory=True) SO_MinRestF = Field(2019, altBg=True, altFg=True, mandatory=True) MinPassThru = Field(2020, altBg=True, altFg=True) Descript = Field(2055) CentIndex = Field(2000) CDB_fields = FieldList() CDB_fields.append(ProdNumber) CDB_fields.append(Type) CDB_fields.append(Vendor) CDB_fields.append(IPOD) CDB_fields.append(OPID) CDB_fields.append(CentOD) CDB_fields.append(CentID) CDB_fields.append(Weight) CDB_fields.append(Length) CDB_fields.append(Bows) CDB_fields.append(StartingF) CDB_fields.append(RunningF) CDB_fields.append(MinRestF) CDB_fields.append(RestF_SO67) CDB_fields.append(SO_MinRestF) CDB_fields.append(MinPassThru) CDB_fields.append(Descript) CDB_fields.append(CentIndex) units = {} for item in items: units[item[0]] = item[1] for field in CDB_fields[:-2]: if units[field.id]: field.headerName = field.representation + ' [' + units[ field.id] + ']' field.unit = units[field.id] else: field.headerName = field.representation field.unit = None return CDB_fields
def get_CDBResin_fields(): query = """ select c.fieldID, u.representation from centralizer_properties c left join units u on c.nativeUnitID=u.unitID where c.centralizerID=(select distinct min(centralizerID) from centralizer_properties where fieldID=2049 and valueRepresentation='Resin') """ items = dbUtils.execute_query(query) ProdNumber = Field(2050, altBg=True, altFg=True) Type = Field(2049, altBg=True, altFg=True, mandatory=True) Vendor = Field(2051, altBg=True, altFg=True) IPOD = Field(2009, altBg=True, altFg=True, mandatory=True) DriftOD = Field(2011, altBg=True, altFg=True, mandatory=True) MinPassThru = Field(2020, altBg=True, altFg=True, mandatory=True) Length = Field(2014, altBg=True, altFg=True, mandatory=True) Blades = Field(2025, altBg=True, altFg=True, mandatory=True) BladeLength = Field(2024, altBg=True, altFg=True, mandatory=True) BladeHeight = Field(2023, altBg=True, altFg=True, mandatory=True) ArcBlade = Field(2022, altBg=True, altFg=True, mandatory=True) GapLength = Field(2021, altBg=True, altFg=True, mandatory=True) FF = Field(2027, altBg=True, altFg=True, mandatory=True) MaxTemp = Field(2026, altBg=True, altFg=True) Descript = Field(2055) CentIndex = Field(2000) CDB_fields = FieldList() CDB_fields.append(ProdNumber) CDB_fields.append(Type) CDB_fields.append(Vendor) CDB_fields.append(IPOD) CDB_fields.append(DriftOD) CDB_fields.append(MinPassThru) CDB_fields.append(Length) CDB_fields.append(Blades) CDB_fields.append(BladeLength) CDB_fields.append(BladeHeight) CDB_fields.append(ArcBlade) CDB_fields.append(GapLength) CDB_fields.append(FF) CDB_fields.append(MaxTemp) CDB_fields.append(Descript) CDB_fields.append(CentIndex) units = {} for item in items: units[item[0]] = item[1] for field in CDB_fields[:-2]: if units[field.id]: field.headerName = field.representation + ' [' + units[ field.id] + ']' field.unit = units[field.id] else: field.headerName = field.representation field.unit = None return CDB_fields