Skip to content

Instantly share code, notes, and snippets.

😎
Solving solar

Mark Mikofski mikofski

😎
Solving solar
Block or report user

Report or block mikofski

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dcloss.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mikofski
mikofski / ny_nsrdb_map.geojson
Last active Mar 13, 2020
NSRDB NY STATIONS
View ny_nsrdb_map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gh656.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mikofski
mikofski / cython_optimize_brentq_benchmark.ipynb
Last active Mar 29, 2019
SciPy Cython Optimize Zeros API
View cython_optimize_brentq_benchmark.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mikofski
mikofski / PV-system-MPP-implicit-solver.ipynb
Last active Mar 13, 2020
proof of an implicit solver
View PV-system-MPP-implicit-solver.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mikofski
mikofski / solpos_mex.c
Last active Jun 7, 2018
MATLAB mex gateway function for NREL SOLPOS
View solpos_mex.c
/*==========================================================
* solpos.c - NREL solar position calculator
*
* calculates solar position from location and time
*
* The calling syntax is:
*
* angles = solpos(location,datetime,weather)
*
* This is a MEX-file for MATLAB.
@mikofski
mikofski / profile_active_mask.py
Created Mar 23, 2018
profiling script of scipy PR8357 to vectorize newton using a mask for active array items
View profile_active_mask.py
from __future__ import division, print_function, absolute_import
import warnings
import numpy as np
# Newton-Raphson method
def newton(func, x0, fprime=None, args=(), tol=1.48e-8, maxiter=50,
fprime2=None, **kwargs):
if tol <= 0:
@mikofski
mikofski / bench_scalar_array_newton.py
Created Mar 1, 2018
Comparison of scalar scipy.optimze.zeros.newton from v1.0.0 with proposed vectorized version from pr #8357
View bench_scalar_array_newton.py
from __future__ import division, print_function, absolute_import
from math import sqrt, exp, sin, cos
import warnings
import numpy as np
# Newton-Raphson method
def scalar_newton(func, x0, fprime=None, args=(), tol=1.48e-8, maxiter=50,
fprime2=None):
"""
@mikofski
mikofski / newton_example.pyx
Last active Apr 24, 2018
cythonized example of scipy.optimized.newton to solve solar-cell for 100,000 different cases
View newton_example.pyx
from __future__ import division, print_function, absolute_import
from math import exp, sin
from scipy.optimize.cython_optimize cimport zeros
NUM_OF_IRRAD = 10
IL = [sin(il) + 6.0 for il in range(NUM_OF_IRRAD)]
# governing equations
@mikofski
mikofski / hdf5dotnet_iso8601_ipy64_example.py
Last active May 19, 2017
IronPython Example of Writing ISO 8601 Strings to HDF5 from .NET
View hdf5dotnet_iso8601_ipy64_example.py
# Writing Fixed Length Strings to HDF5 file using HDF5DotNet
# http://hdf5.net/
# * download HDF5 library and install first
# * add shared objects to PATH
# set PATH=%PATH%;C:\Program Files\HDF Group\HDF5\1.8.9\bin
# * download and extract HDF5DotNet assemblies
# * start IronPython (ipy64.exe), must be 64-bit version!
# help links:
You can’t perform that action at this time.