ecopipeline 0.11.6__py3-none-any.whl → 0.11.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ from .transform import rename_sensors, avg_duplicate_times, remove_outliers, ffi
2
2
  aggregate_df, join_to_hourly, concat_last_row, join_to_daily, cop_method_1, cop_method_2, create_summary_tables, remove_partial_days, \
3
3
  convert_c_to_f,convert_l_to_g, convert_on_off_col_to_bool, flag_dhw_outage,generate_event_log_df,convert_time_zone, shift_accumulative_columns, \
4
4
  heat_output_calc, add_relative_humidity, apply_equipment_cop_derate, create_data_statistics_df, delete_erroneous_from_time_pt,column_name_change, \
5
- process_ls_signal
5
+ process_ls_signal, convert_temp_resistance_type
6
6
  from .lbnl import nclarity_filter_new, site_specific, condensate_calculations, gas_valve_diff, gather_outdoor_conditions, aqsuite_prep_time, \
7
7
  nclarity_csv_to_df, _add_date, add_local_time, aqsuite_filter_new, get_refrig_charge, elev_correction, change_ID_to_HVAC, get_hvac_state, \
8
8
  get_cop_values, get_cfm_values, replace_humidity, create_fan_curves, lbnl_temperature_conversions, lbnl_pressure_conversions, \
@@ -14,4 +14,4 @@ __all__ = ["rename_sensors", "avg_duplicate_times", "remove_outliers", "ffill_mi
14
14
  "create_fan_curves", "lbnl_temperature_conversions", "lbnl_pressure_conversions", "lbnl_sat_calculations", "get_site_cfm_info", "get_site_info", "merge_indexlike_rows", "calculate_cop_values", "aggregate_values",
15
15
  "get_energy_by_min", "verify_power_energy", "get_temp_zones120", "get_storage_gals120","convert_c_to_f","convert_l_to_g", "convert_on_off_col_to_bool", "flag_dhw_outage","generate_event_log_df","convert_time_zone",
16
16
  "shift_accumulative_columns","heat_output_calc", "add_relative_humidity","apply_equipment_cop_derate","create_data_statistics_df",
17
- "delete_erroneous_from_time_pt","column_name_change","process_ls_signal"]
17
+ "delete_erroneous_from_time_pt","column_name_change","process_ls_signal", "convert_temp_resistance_type"]
@@ -1,7 +1,7 @@
1
1
  import pandas as pd
2
2
  import numpy as np
3
3
  import datetime as dt
4
- import csv
4
+ import pickle
5
5
  import os
6
6
  from ecopipeline.utils.unit_convert import temp_c_to_f_non_noaa, volume_l_to_g, power_btuhr_to_kw, temp_f_to_c
7
7
  from ecopipeline import ConfigManager
@@ -305,6 +305,44 @@ def ffill_missing(original_df: pd.DataFrame, config : ConfigManager, previous_fi
305
305
  df.apply(_ffill, args=(ffill_df,previous_fill))
306
306
  return df
307
307
 
308
+ def convert_temp_resistance_type(df : pd.DataFrame, column_name : str, sensor_model = 'veris') -> pd.DataFrame:
309
+ """
310
+ Convert temperature in Fahrenheit to resistance in Ohms for 10k Type 2 thermistor.
311
+
312
+ Parameters:
313
+ -----------
314
+ temp_F : float or array-like
315
+ Temperature in Fahrenheit
316
+ model_path : str, optional
317
+ Path to a pickle file containing a saved interpolation model.
318
+ If provided, loads and uses that model instead of the global interp_model.
319
+ If None, uses the global interp_model.
320
+
321
+ Returns:
322
+ --------
323
+ float or ndarray
324
+ Resistance in Ohms
325
+ """
326
+ model_path_t_to_r = '../utils/pkls/'
327
+ model_path_r_to_t = '../utils/pkls/'
328
+ if sensor_model == 'veris':
329
+ model_path_t_to_r = model_path_t_to_r + 'veris_temp_to_resistance_2.pkl'
330
+ model_path_r_to_t = model_path_r_to_t + 'veris_resistance_to_temp_3.pkl'
331
+ elif sensor_model == 'tasseron':
332
+ model_path_t_to_r = model_path_t_to_r + 'tasseron_temp_to_resistance_2.pkl'
333
+ model_path_r_to_t = model_path_r_to_t + 'tasseron_resistance_to_temp_3.pkl'
334
+ else:
335
+ raise Exception("unsupported sensor model")
336
+
337
+ with open(os.path.join(os.path.dirname(__file__),model_path_t_to_r), 'rb') as f:
338
+ model = pickle.load(f)
339
+ df['resistance'] = df[column_name].apply(model)
340
+ with open(os.path.join(os.path.dirname(__file__),model_path_r_to_t), 'rb') as f:
341
+ model = pickle.load(f)
342
+ df[column_name] = df['resistance'].apply(model)
343
+ df.drop(columns='resistance')
344
+ return df
345
+
308
346
  def process_ls_signal(df: pd.DataFrame, hourly_df: pd.DataFrame, daily_df: pd.DataFrame, load_dict: dict = {1: "normal", 2: "loadUp", 3 : "shed"}, ls_column: str = 'ls',
309
347
  drop_ls_from_df : bool = False):
310
348
  """
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecopipeline
3
- Version: 0.11.6
3
+ Version: 0.11.8
4
4
  Summary: Contains functions for use in Ecotope Datapipelines
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: GNU General Public License (GPL)
@@ -5,16 +5,17 @@ ecopipeline/extract/__init__.py,sha256=gQ3sak6NJ63Gpo-hZXrtZfeKOTHLRyAVXfTgxxRpq
5
5
  ecopipeline/extract/extract.py,sha256=5C6KrfMAGQhTxHaWc1Lgm8yV5g994Fiinwk-IEVSHbM,51519
6
6
  ecopipeline/load/__init__.py,sha256=NLa_efQJZ8aP-J0Y5xx9DP7mtfRH9jY6Jz1ZMZN_BAA,292
7
7
  ecopipeline/load/load.py,sha256=PaSGWOZI0Xg44_SWN7htn2DPIAU_s8mOtCGibXq25tM,24614
8
- ecopipeline/transform/__init__.py,sha256=9au1Rjw7SMtbIxpoq_5XWi6VWTxMU2CBjPksSh4LM1o,2590
8
+ ecopipeline/transform/__init__.py,sha256=Cg9eIHV891zoos6mroZoDE2Q7smukm6qqt2vPxsF2NY,2652
9
9
  ecopipeline/transform/bayview.py,sha256=TP24dnTsUD95X-f6732egPZKjepFLJgDm9ImGr-fppY,17899
10
10
  ecopipeline/transform/lbnl.py,sha256=EQ54G4rJXaZ7pwVusKcdK2KBehSdCsNo2ybphtMGs7o,33400
11
- ecopipeline/transform/transform.py,sha256=UF-sNw4zoxyXv0zsJZk6AqfQxXmAVQ_fsVZtjKiu1sk,54012
11
+ ecopipeline/transform/transform.py,sha256=DAHw16R-rRJr7Y3EhUGCL3E-pZcnXS7byZS7vtA4Bic,55577
12
12
  ecopipeline/utils/ConfigManager.py,sha256=-g1wtExdvhYO5Y6Q3cRbywa__DxRMFruLrB4YanwaPY,12168
13
13
  ecopipeline/utils/NOAADataDownloader.py,sha256=iC2nl_O4PS1KFrchcPXRZxshwZwUMSqXy6BQBUwnOUU,20927
14
14
  ecopipeline/utils/__init__.py,sha256=7dT3tP6SMK4uBW6NBmQ8i6LaNTTuV6fpAZToBBlJ904,62
15
15
  ecopipeline/utils/unit_convert.py,sha256=VFh1we2Y8KV3u21BeWb-U3TlZJXo83q5vdxxkpgcuME,3064
16
- ecopipeline-0.11.6.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- ecopipeline-0.11.6.dist-info/METADATA,sha256=gpFWc8ZON7l0l4u7zp6b4OLx7s2XDfgln5ZmA5gT8Ko,2330
18
- ecopipeline-0.11.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- ecopipeline-0.11.6.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
20
- ecopipeline-0.11.6.dist-info/RECORD,,
16
+ ecopipeline/utils/pkls/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ ecopipeline-0.11.8.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ ecopipeline-0.11.8.dist-info/METADATA,sha256=82tg1ZTMdS2VvfGAiVSrHqHuEmudNB3PzuNFvhj3EEk,2330
19
+ ecopipeline-0.11.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ ecopipeline-0.11.8.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
21
+ ecopipeline-0.11.8.dist-info/RECORD,,