-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 93dee20
Showing
58 changed files
with
7,054 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 3918f24493e11f367aae8999c4a79e2a | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
API | ||
=== | ||
|
||
.. autosummary:: | ||
:toctree: generated | ||
|
||
ISARA | ||
mopsmap_wrapper | ||
importICARTT | ||
load_sizebins | ||
ISARA_ACTIVATE_Data_Retrieval |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
ISARA | ||
===== | ||
|
||
.. automodule:: ISARA | ||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
Retr_CRI | ||
Retr_kappa | ||
|
||
.. rubric:: Exceptions | ||
|
||
.. autosummary:: | ||
|
||
InvalidNumberOfWavelengths | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ISARA\_ACTIVATE\_Data\_Retrieval | ||
================================ | ||
|
||
.. automodule:: ISARA_ACTIVATE_Data_Retrieval | ||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
RunISARA | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
importICARTT | ||
============ | ||
|
||
.. automodule:: importICARTT | ||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
imp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
load\_sizebins | ||
============== | ||
|
||
.. automodule:: load_sizebins | ||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
Load | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
mopsmap\_wrapper | ||
================ | ||
|
||
.. automodule:: mopsmap_wrapper | ||
|
||
|
||
.. rubric:: Functions | ||
|
||
.. autosummary:: | ||
|
||
Model | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.. ISARA documentation master file | ||
Welcome to ISARA's documentation! | ||
--------------------------------- | ||
|
||
.. include:: ../README.rst | ||
|
||
.. note:: | ||
|
||
This website may have trouble loading properly on Mozilla Firefox. To ensure that the website runs smoothly, go to Settings -> Privacy & Security -> uncheck "Query OCSP responder servers to confirm the current validity of certificates." If users have any other issues, please email us using the information listed in "Contact". | ||
|
||
Index | ||
----- | ||
|
||
.. toctree:: | ||
|
||
:ref:`modindex` | ||
|
||
Contents | ||
-------- | ||
|
||
.. toctree:: | ||
|
||
usage | ||
api | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
Usage | ||
===== | ||
Acknowledgements | ||
---------------- | ||
|
||
ISARA is being developed in collaboration with the Office of Naval Research, Oak Ridge Associated Universities, NASA Langley Research Center, and the University of Arizona. | ||
|
||
|
||
Copyright | ||
--------- | ||
MIT License | ||
|
||
Copyright 2023 Joseph Schlosser, Snorre Stamnes, Sanja Dmitrovic | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
|
||
Installation | ||
------------ | ||
|
||
To use ISARA, first install it using pip: | ||
|
||
.. code-block:: console | ||
(.venv) $ pip3 install ISARA | ||
Retrieve Complex Refractive Index | ||
--------------------------------- | ||
|
||
.. autofunction:: ISARA.Retr_CRI | ||
|
||
>>> import ISARA | ||
>>> import numpy as np | ||
>>> import os | ||
>>> import sys | ||
>>> RRI = 1.53 | ||
>>> IRI = np.hstack((0.0001, np.arange(0.001,0.041,0.001).reshape(-1))) | ||
>>> wvl = np.array([0.450, 0.470, 0.532, 0.550, 0.660, 0.700]) | ||
>>> measured_sca_coef = np.array([26.7769, 22.9139, 21.2927])*pow(10,-6) | ||
>>> measured_abs_coef = np.array([0.91078, 0.72244, 0.36833])*pow(10,-6) | ||
>>> sd1 = np.array([0.00,2527.74,0.00E+00,0.00E+00,2005.82,0.00E+00,1207.24,899.07,718.81,899.1,1000.6,874.72,1241.7,1655.18,376.54,2159.19,2626.72,3489.7,2749.07,2378.41,2015.2,2089.09,2676,3190.64,3483.72,3839.27,3667.73,4412.98,4220.87,3913.1])*pow(10,6) | ||
>>> sd2 = np.array([4464.27, 4307.44, 3495.04, 3198.41, 1972.54, 1523.9, 1173, 907.394, 696.4407, 474.6136, 274.8, 212.104, 105.9756, 64.9613, 6.35556, 5.82689, 4.23289, 1.59156, 2.64978, 0.70533, 1.41356, 0.42222, 0.42311, 0.00E+00, 1.05978, 0.63622])*pow(10,6) | ||
>>> dpg1 = np.array([3.16,3.55,3.98,4.47,5.01,5.62,6.31,7.08,7.94,8.91,10.0,11.2,12.6,14.1,15.8,17.8,20.0,22.4,25.1,28.2,31.6,35.5,39.8,44.7,50.1,56.2,63.1,70.8,79.4,89.1])*pow(10,-3) | ||
>>> dpg2 = np.array([100.0,112.2,125.9,141.3,158.5,177.8,199.5,223.9,251.2,281.8,316.2,354.8,398.1,446.7,501.2,562.3,631.0,707.9,794.3,891.3,1000.0,1258.9,1584.9,1995.3,2511.9,3162.3])*pow(10,-3) | ||
>>> CRI = np.zeros((len(IRI), 2)) | ||
>>> for i1 in range(len(IRI)): CRI[i1, :] = [RRI, IRI[i1]] | ||
>>> size_equ1 = 'cs' | ||
>>> size_equ2 = 'cs' | ||
>>> nonabs_fraction1 = 0 | ||
>>> nonabs_fraction2 = 0 | ||
>>> shape1 = 'sphere' | ||
>>> shape2 = 'sphere' | ||
>>> rho1 = 2.63 | ||
>>> rho2 = 2.63 | ||
>>> num_theta = 2 | ||
>>> Results = ISARA.Retr_CRI(wvl,measured_sca_coef,measured_abs_coef,sd1,sd2,dpg1,dpg2,CRI,size_equ1,size_equ2,nonabs_fraction1,nonabs_fraction2,shape1,shape2,rho1,rho2,num_theta) | ||
|
||
Retrieve Hygroscopicity | ||
----------------------- | ||
|
||
.. autofunction:: ISARA.Retr_kappa | ||
|
||
>>> import ISARA | ||
>>> import numpy as np | ||
>>> import os | ||
>>> import sys | ||
>>> RRI = 1.53 | ||
>>> IRI = np.hstack((0.0001, np.arange(0.001,0.041,0.001).reshape(-1))) | ||
>>> wvl = np.array([0.450, 0.470, 0.532, 0.550, 0.660, 0.700]) | ||
>>> measured_sca_coef = np.array([26.7769, 22.9139, 21.2927])*3*pow(10,-6) | ||
>>> measured_abs_coef = np.array([0.91078, 0.72244, 0.36833])*pow(10,-6) | ||
>>> sd1 = np.array([0.00,2527.74,0.00E+00,0.00E+00,2005.82,0.00E+00,1207.24,899.07,718.81,899.1,1000.6,874.72,1241.7,1655.18,376.54,2159.19,2626.72,3489.7,2749.07,2378.41,2015.2,2089.09,2676,3190.64,3483.72,3839.27,3667.73,4412.98,4220.87,3913.1])*pow(10,6) | ||
>>> sd2 = np.array([4464.27, 4307.44, 3495.04, 3198.41, 1972.54, 1523.9, 1173, 907.394, 696.4407, 474.6136, 274.8, 212.104, 105.9756, 64.9613, 6.35556, 5.82689, 4.23289, 1.59156, 2.64978, 0.70533, 1.41356, 0.42222, 0.42311, 0.00E+00, 1.05978, 0.63622])*pow(10,6) | ||
>>> dpg1 = np.array([3.16,3.55,3.98,4.47,5.01,5.62,6.31,7.08,7.94,8.91,10.0,11.2,12.6,14.1,15.8,17.8,20.0,22.4,25.1,28.2,31.6,35.5,39.8,44.7,50.1,56.2,63.1,70.8,79.4,89.1])*pow(10,-3) | ||
>>> dpg2 = np.array([100.0,112.2,125.9,141.3,158.5,177.8,199.5,223.9,251.2,281.8,316.2,354.8,398.1,446.7,501.2,562.3,631.0,707.9,794.3,891.3,1000.0,1258.9,1584.9,1995.3,2511.9,3162.3])*pow(10,-3) | ||
>>> CRI = np.zeros((len(IRI), 2)) | ||
>>> for i1 in range(len(IRI)): CRI[i1, :] = [RRI, IRI[i1]] | ||
>>> size_equ1 = 'cs' | ||
>>> size_equ2 = 'cs' | ||
>>> nonabs_fraction1 = 0 | ||
>>> nonabs_fraction2 = 0 | ||
>>> shape1 = 'sphere' | ||
>>> shape2 = 'sphere' | ||
>>> rho1 = 2.63 | ||
>>> rho2 = 2.63 | ||
>>> num_theta = 2 | ||
>>> Results = ISARA.Retr_CRI(wvl,measured_sca_coef,measured_abs_coef,sd1,sd2,dpg1,dpg2,CRI,size_equ1,size_equ2,nonabs_fraction1,nonabs_fraction2,shape1,shape2,rho1,rho2,num_theta) | ||
>>> RRI_dry = Results["RRIdry"] | ||
>>> IRI_dry = Results["IRIdry"] | ||
>>> CRI1 = np.array([RRI_dry,IRI_dry]) | ||
>>> CRI2 = np.array([RRI_dry,IRI_dry]) | ||
>>> measured_wet_sca_coef = np.array([22.9139])*8*pow(10,-6) | ||
>>> RH = 85 | ||
>>> Kappa = np.arange(0.0, 1.40, 0.01).reshape(-1) | ||
>>> Results2 = ISARA.Retr_kappa(wvl,measured_sca_coef,measured_wet_sca_coef,sd1,sd2,dpg1,dpg2,RH,Kappa,CRI1,CRI2,size_equ1,size_equ2,nonabs_fraction1,nonabs_fraction2,shape1,shape2,rho1,rho2,num_theta) | ||
|
||
Wavelength Excemption | ||
--------------------- | ||
|
||
.. autoexception:: ISARA.InvalidNumberOfWavelengths | ||
|
||
|
||
Forward Model for Aerosol Optial Properties | ||
------------------------------------------- | ||
|
||
.. autofunction:: mopsmap_wrapper.Model | ||
|
||
|
||
Import ICARTT Files | ||
------------------- | ||
|
||
.. autofunction:: importICARTT.imp | ||
|
||
|
||
Import Diameters of Aerosol Size Distribution | ||
--------------------------------------------- | ||
|
||
.. autofunction:: load_sizebins.Load | ||
|
||
|
||
ISARA ACTIVATE Data Retrievals | ||
------------------------------ | ||
|
||
.. autofunction:: ISARA_ACTIVATE_Data_Retrieval.RunISARA | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
/* Compatability shim for jQuery and underscores.js. | ||
* | ||
* Copyright Sphinx contributors | ||
* Released under the two clause BSD licence | ||
*/ | ||
|
||
/** | ||
* small helper function to urldecode strings | ||
* | ||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL | ||
*/ | ||
jQuery.urldecode = function(x) { | ||
if (!x) { | ||
return x | ||
} | ||
return decodeURIComponent(x.replace(/\+/g, ' ')); | ||
}; | ||
|
||
/** | ||
* small helper function to urlencode strings | ||
*/ | ||
jQuery.urlencode = encodeURIComponent; | ||
|
||
/** | ||
* This function returns the parsed url parameters of the | ||
* current request. Multiple values per key are supported, | ||
* it will always return arrays of strings for the value parts. | ||
*/ | ||
jQuery.getQueryParameters = function(s) { | ||
if (typeof s === 'undefined') | ||
s = document.location.search; | ||
var parts = s.substr(s.indexOf('?') + 1).split('&'); | ||
var result = {}; | ||
for (var i = 0; i < parts.length; i++) { | ||
var tmp = parts[i].split('=', 2); | ||
var key = jQuery.urldecode(tmp[0]); | ||
var value = jQuery.urldecode(tmp[1]); | ||
if (key in result) | ||
result[key].push(value); | ||
else | ||
result[key] = [value]; | ||
} | ||
return result; | ||
}; | ||
|
||
/** | ||
* highlight a given string on a jquery object by wrapping it in | ||
* span elements with the given class name. | ||
*/ | ||
jQuery.fn.highlightText = function(text, className) { | ||
function highlight(node, addItems) { | ||
if (node.nodeType === 3) { | ||
var val = node.nodeValue; | ||
var pos = val.toLowerCase().indexOf(text); | ||
if (pos >= 0 && | ||
!jQuery(node.parentNode).hasClass(className) && | ||
!jQuery(node.parentNode).hasClass("nohighlight")) { | ||
var span; | ||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); | ||
if (isInSVG) { | ||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); | ||
} else { | ||
span = document.createElement("span"); | ||
span.className = className; | ||
} | ||
span.appendChild(document.createTextNode(val.substr(pos, text.length))); | ||
node.parentNode.insertBefore(span, node.parentNode.insertBefore( | ||
document.createTextNode(val.substr(pos + text.length)), | ||
node.nextSibling)); | ||
node.nodeValue = val.substr(0, pos); | ||
if (isInSVG) { | ||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); | ||
var bbox = node.parentElement.getBBox(); | ||
rect.x.baseVal.value = bbox.x; | ||
rect.y.baseVal.value = bbox.y; | ||
rect.width.baseVal.value = bbox.width; | ||
rect.height.baseVal.value = bbox.height; | ||
rect.setAttribute('class', className); | ||
addItems.push({ | ||
"parent": node.parentNode, | ||
"target": rect}); | ||
} | ||
} | ||
} | ||
else if (!jQuery(node).is("button, select, textarea")) { | ||
jQuery.each(node.childNodes, function() { | ||
highlight(this, addItems); | ||
}); | ||
} | ||
} | ||
var addItems = []; | ||
var result = this.each(function() { | ||
highlight(this, addItems); | ||
}); | ||
for (var i = 0; i < addItems.length; ++i) { | ||
jQuery(addItems[i].parent).before(addItems[i].target); | ||
} | ||
return result; | ||
}; | ||
|
||
/* | ||
* backward compatibility for jQuery.browser | ||
* This will be supported until firefox bug is fixed. | ||
*/ | ||
if (!jQuery.browser) { | ||
jQuery.uaMatch = function(ua) { | ||
ua = ua.toLowerCase(); | ||
|
||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || | ||
/(webkit)[ \/]([\w.]+)/.exec(ua) || | ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || | ||
/(msie) ([\w.]+)/.exec(ua) || | ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || | ||
[]; | ||
|
||
return { | ||
browser: match[ 1 ] || "", | ||
version: match[ 2 ] || "0" | ||
}; | ||
}; | ||
jQuery.browser = {}; | ||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; | ||
} |
Oops, something went wrong.