ecopipeline 0.11.6__tar.gz → 0.11.8__tar.gz
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.
- {ecopipeline-0.11.6/src/ecopipeline.egg-info → ecopipeline-0.11.8}/PKG-INFO +1 -1
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/setup.cfg +1 -1
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/transform/__init__.py +2 -2
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/transform/transform.py +39 -1
- ecopipeline-0.11.8/src/ecopipeline/utils/pkls/__init__.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8/src/ecopipeline.egg-info}/PKG-INFO +1 -1
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline.egg-info/SOURCES.txt +2 -1
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/LICENSE +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/README.md +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/pyproject.toml +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/setup.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/__init__.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/event_tracking/__init__.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/event_tracking/event_tracking.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/extract/__init__.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/extract/extract.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/load/__init__.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/load/load.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/transform/bayview.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/transform/lbnl.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/utils/ConfigManager.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/utils/NOAADataDownloader.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/utils/__init__.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline/utils/unit_convert.py +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline.egg-info/dependency_links.txt +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline.egg-info/requires.txt +0 -0
- {ecopipeline-0.11.6 → ecopipeline-0.11.8}/src/ecopipeline.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
name = ecopipeline
|
|
3
|
-
version = 0.11.
|
|
3
|
+
version = 0.11.8
|
|
4
4
|
authors = ["Carlos Bello, <bellocarlos@seattleu.edu>, Emil Fahrig <fahrigemil@seattleu.edu>, Casey Mang <cmang@seattleu.edu>, Julian Harris <harrisjulian@seattleu.edu>, Roger Tram <rtram@seattleu.edu>, Nolan Price <nolan@ecotope.com>"]
|
|
5
5
|
description = Contains functions for use in Ecotope Datapipelines
|
|
6
6
|
long_description = file: README.md
|
|
@@ -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
|
|
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
|
|
@@ -22,4 +22,5 @@ src/ecopipeline/transform/transform.py
|
|
|
22
22
|
src/ecopipeline/utils/ConfigManager.py
|
|
23
23
|
src/ecopipeline/utils/NOAADataDownloader.py
|
|
24
24
|
src/ecopipeline/utils/__init__.py
|
|
25
|
-
src/ecopipeline/utils/unit_convert.py
|
|
25
|
+
src/ecopipeline/utils/unit_convert.py
|
|
26
|
+
src/ecopipeline/utils/pkls/__init__.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|