Package org.drip.spline.segment
Class LatentStateResponseModel
java.lang.Object
org.drip.spline.segment.LatentStateInelastic
org.drip.spline.segment.LatentStateResponseModel
- All Implemented Interfaces:
java.lang.Comparable<LatentStateInelastic>
public class LatentStateResponseModel extends LatentStateInelastic
LatentStateResponseModel implements the single segment basis calibration and inference
functionality. It exports the following functionality:
- Build the LatentStateResponseModel instance from the Basis Function/Shape Controller Set
- Build the LatentStateResponseModel instance from the Basis Evaluator Set
- Retrieve the Number of Parameters, Basis Evaluator, Array of the Response Basis Coefficients, and Segment Design Inelastic Control
- Calibrate the Segment State from the Calibration Parameter Set
- Sensitivity Calibrator: Calibrate the Segment Manifest Jacobian from the Calibration Parameter Set
- Calibrate the coefficients from the prior Predictor/Response Segment, the Constraint, and fitness Weights
- Calibrate the coefficients from the prior Segment and the Response Value at the Right Predictor Ordinate
- Calibrate the Coefficients from the Edge Response Values and the Left Edge Response Slope
- Calibrate the coefficients from the Left Edge Response Value Constraint, the Left Edge Response Value Slope, and the Right Edge Response Value Constraint
- Retrieve the Segment Curvature, Length, and the Best Fit DPE
- Calculate the Response Value and its Derivative at the given Predictor Ordinate
- Calculate the Ordered Derivative of the Coefficient to the Manifest
- Calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge Inputs
- Calculate the Jacobian of the Response to the Edge Inputs at the given Predictor Ordinate
- Calculate the Jacobian of the Response to the Basis Coefficients at the given Predictor Ordinate
- Calibrate the segment and calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge Parameters
- Calibrate the Coefficients from the Edge Response Values and the Left Edge Response Value Slope and calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge Parameters
- Calibrate the coefficients from the prior Segment and the Response Value at the Right Predictor Ordinate and calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge Parameters
- Indicate whether the given segment is monotone. If monotone, may optionally indicate the nature of the extrema contained inside (maxima/minima/infection)
- Clip the part of the Segment to the Right of the specified Predictor Ordinate. Retain all other constraints the same
- Clip the part of the Segment to the Left of the specified Predictor Ordinate. Retain all other constraints the same
- Display the string representation for diagnostic purposes
- Module = Computational Core Module
- Library = Spline Builder Library
- Project = Basis Splines and Linear Compounders across a Broad Family of Spline Basis Functions
- Package = Flexure Penalizing Best Fit Segment
- Author:
- Lakshmi Krishnamurthy
-
Field Summary
Fields Modifier and Type Field Description static int
LEFT_NODE_VALUE_PARAMETER_INDEX
LEFT NODE VALUE PARAMETER INDEXstatic int
RIGHT_NODE_VALUE_PARAMETER_INDEX
RIGHT NODE VALUE PARAMETER INDEX -
Method Summary
Modifier and Type Method Description BasisEvaluator
basisEvaluator()
Retrieve the Basis Evaluatordouble
bestFitDPE(SegmentBestFitResponse sbfr)
Retrieve the Segment Best Fit DPEdouble
calcDResponseDManifest(java.lang.String strManifestMeasure, double dblPredictorOrdinate, int iOrder)
Calculate the Ordered Derivative of the Response to the Manifestdouble
calcDResponseDPreceedingManifest(java.lang.String strManifestMeasure, double dblPredictorOrdinate, int iOrder)
Calculate the Ordered Derivative of the Response to the Preceeding Manifestdouble
calcResponseValueDerivative(double dblPredictorOrdinate, int iOrder)
Calculate the Ordered Response Value Derivative at the Predictor Ordinateboolean
calibrate(double dblLeftValue, double dblLeftSlope, double dblRightValue, SegmentBestFitResponse sbfrState)
Calibrate the Coefficients from the Edge Response Values and the Left Edge Response Slopeboolean
calibrate(SegmentResponseValueConstraint wrvcStateLeft, double dblLeftSlope, SegmentResponseValueConstraint wrvcStateRight, SegmentBestFitResponse sbfrState)
Calibrate the coefficients from the Left Edge Response Value Constraint, the Left Edge Response Value Slope, and the Right Edge Response Value Constraintboolean
calibrate(LatentStateResponseModel csPreceeding, double dblRightStateValue, SegmentBestFitResponse sbfrState)
Calibrate the coefficients from the prior Segment and the Response Value at the Right Predictor Ordinateboolean
calibrate(LatentStateResponseModel csPreceeding, SegmentResponseValueConstraint srvcState, SegmentBestFitResponse sbfrState)
Calibrate the coefficients from the prior Predictor/Response Segment, the Constraint, and fitness Weightsboolean
calibrateLocalManifestJacobian(java.lang.String strManifestMeasure, SegmentStateCalibrationInputs ssciManifestSensitivity, SegmentBasisFlexureConstraint[] aSBFCState)
Sensitivity Calibrator: Calibrate the Segment Local Manifest Jacobian from the Calibration Parameter Setdouble[]
calibrateManifestJacobian(SegmentStateCalibrationInputs ssciManifestSensitivity, SegmentBasisFlexureConstraint[] aSBFCState)
Sensitivity Calibrator: Calibrate the Segment Manifest Measure Jacobian from the Calibration Inputsboolean
calibratePreceedingManifestJacobian(java.lang.String strManifestMeasure, SegmentStateCalibrationInputs ssciPreceedingManifestSensitivity)
Sensitivity Calibrator: Calibrate the Segment Preceeding Manifest Jacobian from the Calibration Parameter Setboolean
calibrateState(SegmentStateCalibrationInputs ssciState)
Main Calibrator: Calibrate the Segment State from the Calibration Parameter SetLatentStateResponseModel
clipLeftOfPredictorOrdinate(double dblPredictorOrdinate)
Clip the part of the Segment to the Right of the specified Predictor Ordinate.LatentStateResponseModel
clipRightOfPredictorOrdinate(double dblPredictorOrdinate)
Clip the part of the Segment to the Right of the specified Predictor Ordinate.static LatentStateResponseModel
Create(double dblLeftPredictorOrdinate, double dblRightPredictorOrdinate, FunctionSet fs, ResponseScalingShapeControl rssc, SegmentInelasticDesignControl sidc)
Build the LatentStateResponseModel instance from the Basis Function/Shape Controller Setstatic LatentStateResponseModel
Create(double dblLeftPredictorOrdinate, double dblRightPredictorOrdinate, BasisEvaluator be, SegmentInelasticDesignControl sidc)
Build the LatentStateResponseModel instance from the Basis Evaluator Setdouble
curvatureDPE()
Retrieve the Segment Curvature DPESegmentInelasticDesignControl
designControl()
Retrieve the Segment Inelastic Design Controljava.lang.String
displayString()
Display the string representation for diagnostic purposesboolean
impactFade(java.lang.String strManifestMeasure)
Retrieve the Manifest Measure Preceeding Manifest Impact FlagWengertJacobian
jackDCoeffDEdgeInputs()
Calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge InputsWengertJacobian
jackDCoeffDEdgeParams(double[] adblPredictorOrdinate, double[] adblResponseValue, double[] adblLeftEdgeDeriv, double[] adblRightEdgeDeriv, SegmentBasisFlexureConstraint[] aSBFC, SegmentBestFitResponse sbfr)
Calibrate the segment and calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge ParametersWengertJacobian
jackDCoeffDEdgeParams(double dblLeftValue, double dblLeftSlope, double dblRightValue, SegmentBestFitResponse sbfrState)
Calibrate the Coefficients from the Edge Response Values and the Left Edge Response Value Slope and calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge ParametersWengertJacobian
jackDCoeffDEdgeParams(LatentStateResponseModel csPreceeding, java.lang.String strManifestMeasure, double dblRightStateValue, SegmentBestFitResponse sbfrState, double dblRightStateManifestSensitivity, SegmentBestFitResponse sbfrManifestSensitivity)
Calibrate the coefficients from the prior Segment and the Response Value at the Right Predictor Ordinate and calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge ParametersWengertJacobian
jackDResponseDBasisCoeff(double dblPredictorOrdinate, int iOrder)
Calculate the Jacobian of the Response to the Basis Coefficients at the given Predictor OrdinateWengertJacobian
jackDResponseDEdgeInput(double dblPredictorOrdinate, int iOrder)
Calculate the Jacobian of the Response to the Edge Inputs at the given Predictor Ordinatedouble
lengthDPE()
Retrieve the Segment Length DPEboolean
manifestMeasureSensitivity(java.lang.String strManifestMeasure, double dblLeftManifestSensitivity, double dblLeftSlopeManifestSensitivity, double dblRightManifestSensitivity, SegmentBestFitResponse sbfrManifestSensitivity)
Compute the Local and the Preceeding Manifest Measure Sensitivity Coefficients from the Local Response Value Sensitivity at the Left/Right Predictor Ordinate, the Local Left Response Value Sensitivity Slope, and the Local Best Fit Response Sensitivity.boolean
manifestMeasureSensitivity(java.lang.String strManifestMeasure, SegmentResponseValueConstraint wrvcStateLeft, SegmentResponseValueConstraint wrvcStateRight, double dblLeftSlopeManifestSensitivity, SegmentResponseValueConstraint wrvcStateLeftManifestSensitivity, SegmentResponseValueConstraint wrvcStateRightManifestSensitivity, SegmentBestFitResponse sbfrManifestSensitivity)
Compute the Local and the Preceeding Manifest Measure Sensitivity Coefficients from the Local Response Value/Sensitivity Constraints at the Left/Right Predictor Ordinate, the Local Left Response Value Sensitivity Slope, and the Local Best Fit Response Sensitivityboolean
manifestMeasureSensitivity(LatentStateResponseModel csPreceeding, java.lang.String strManifestMeasure, double dblRightStateManifestSensitivity, SegmentBestFitResponse sbfrManifestSensitivity)
Compute the Local and the Preceeding Manifest Measure Sensitivity Coefficients from the Preceeding Segments, the Local Response Value Sensitivity at the Right Predictor Ordinate, and the Local Best Fit Response Sensitivityboolean
manifestMeasureSensitivity(LatentStateResponseModel csPreceeding, java.lang.String strManifestMeasure, SegmentResponseValueConstraint srvcState, SegmentResponseValueConstraint srvcManifestSensitivity, SegmentBestFitResponse sbfrManifestSensitivity)
Compute the Local and the Preceeding Manifest Measure Sensitivity Coefficients from the Preceeding Segment, the Local Response Value, the Local Response Value Manifest Measure Sensitivity, and the Local Best Fit Response SensitivityMonotonocity
monotoneType()
Indicate whether the given segment is monotone.int
numParameters()
Retrieve the Number of Parametersdouble[]
responseBasisCoefficient()
Retrieve the Array of Response Basis Coefficientsdouble
responseValue(double dblPredictorOrdinate)
Calculate the Response Value at the given Predictor Ordinateboolean
setPreceedingManifestSensitivityControl(java.lang.String strManifestMeasure, PreceedingManifestSensitivityControl pmsc)
Set the Preceeding Manifest Sensitivity Control Parameters for the specified Manifest MeasureMethods inherited from class org.drip.spline.segment.LatentStateInelastic
compareTo, delocalize, hashCode, in, left, localize, right, width
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
LEFT_NODE_VALUE_PARAMETER_INDEX
public static final int LEFT_NODE_VALUE_PARAMETER_INDEXLEFT NODE VALUE PARAMETER INDEX- See Also:
- Constant Field Values
-
RIGHT_NODE_VALUE_PARAMETER_INDEX
public static final int RIGHT_NODE_VALUE_PARAMETER_INDEXRIGHT NODE VALUE PARAMETER INDEX- See Also:
- Constant Field Values
-
-
Method Details
-
Create
public static final LatentStateResponseModel Create(double dblLeftPredictorOrdinate, double dblRightPredictorOrdinate, FunctionSet fs, ResponseScalingShapeControl rssc, SegmentInelasticDesignControl sidc)Build the LatentStateResponseModel instance from the Basis Function/Shape Controller Set- Parameters:
dblLeftPredictorOrdinate
- Left Predictor OrdinatedblRightPredictorOrdinate
- Right Predictor Ordinatefs
- Response Basis Function Setrssc
- Shape Controllersidc
- Segment Inelastic Design Parameters- Returns:
- Instance of LatentStateResponseModel
-
Create
public static final LatentStateResponseModel Create(double dblLeftPredictorOrdinate, double dblRightPredictorOrdinate, BasisEvaluator be, SegmentInelasticDesignControl sidc)Build the LatentStateResponseModel instance from the Basis Evaluator Set- Parameters:
dblLeftPredictorOrdinate
- Left Predictor OrdinatedblRightPredictorOrdinate
- Right Predictor Ordinatebe
- Basis Evaluatorsidc
- Segment Inelastic Design Parameters- Returns:
- Instance of LatentStateResponseModel
-
setPreceedingManifestSensitivityControl
public boolean setPreceedingManifestSensitivityControl(java.lang.String strManifestMeasure, PreceedingManifestSensitivityControl pmsc)Set the Preceeding Manifest Sensitivity Control Parameters for the specified Manifest Measure- Parameters:
strManifestMeasure
- The Manifest Measurepmsc
- The Preceeding Manifest Sensitivity Control Instance- Returns:
- TRUE - Named Preceeding Manifest Sensitivity Control Instance Successfully Set
-
numParameters
public int numParameters()Retrieve the Number of Parameters- Returns:
- The Number of Parameters
-
basisEvaluator
Retrieve the Basis Evaluator- Returns:
- The Basis Evaluator
-
responseBasisCoefficient
public double[] responseBasisCoefficient()Retrieve the Array of Response Basis Coefficients- Returns:
- The Array of Response Basis Coefficients
-
designControl
Retrieve the Segment Inelastic Design Control- Returns:
- The Segment Inelastic Design Control
-
calibrateState
Main Calibrator: Calibrate the Segment State from the Calibration Parameter Set- Parameters:
ssciState
- The Segment State Calibration Inputs Set- Returns:
- TRUE - Calibration Successful
-
calibrateManifestJacobian
public double[] calibrateManifestJacobian(SegmentStateCalibrationInputs ssciManifestSensitivity, SegmentBasisFlexureConstraint[] aSBFCState)Sensitivity Calibrator: Calibrate the Segment Manifest Measure Jacobian from the Calibration Inputs- Parameters:
ssciManifestSensitivity
- The Segment Manifest Calibration Sensitivity InputsaSBFCState
- Array of Segment State Basis Flexure Constraints- Returns:
- The Manifest Sensitivity Coefficients
-
calibrateLocalManifestJacobian
public boolean calibrateLocalManifestJacobian(java.lang.String strManifestMeasure, SegmentStateCalibrationInputs ssciManifestSensitivity, SegmentBasisFlexureConstraint[] aSBFCState)Sensitivity Calibrator: Calibrate the Segment Local Manifest Jacobian from the Calibration Parameter Set- Parameters:
strManifestMeasure
- Latent State Manifest MeasuressciManifestSensitivity
- The Segment Manifest Calibration Parameter SensitivityaSBFCState
- Array of Segment State Basis Flexure Constraints- Returns:
- TRUE - Local Manifest Sensitivity Calibration Successful
-
calibratePreceedingManifestJacobian
public boolean calibratePreceedingManifestJacobian(java.lang.String strManifestMeasure, SegmentStateCalibrationInputs ssciPreceedingManifestSensitivity)Sensitivity Calibrator: Calibrate the Segment Preceeding Manifest Jacobian from the Calibration Parameter Set- Parameters:
strManifestMeasure
- Latent State ManifestssciPreceedingManifestSensitivity
- The Segment Preceeding Manifest Calibration Parameter Sensitivity- Returns:
- TRUE - Preceeding Manifest Sensitivity Calibration Successful
-
calibrate
public boolean calibrate(LatentStateResponseModel csPreceeding, SegmentResponseValueConstraint srvcState, SegmentBestFitResponse sbfrState)Calibrate the coefficients from the prior Predictor/Response Segment, the Constraint, and fitness Weights- Parameters:
csPreceeding
- Preceeding Predictor/Response SegmentsrvcState
- The Segment State Response Value ConstraintsbfrState
- Segment's Best Fit Weighted State Response Values- Returns:
- TRUE - If the calibration succeeds
-
calibrate
public boolean calibrate(LatentStateResponseModel csPreceeding, double dblRightStateValue, SegmentBestFitResponse sbfrState)Calibrate the coefficients from the prior Segment and the Response Value at the Right Predictor Ordinate- Parameters:
csPreceeding
- Preceeding Predictor/Response SegmentdblRightStateValue
- Response Value at the Right Predictor OrdinatesbfrState
- Segment's Best Fit Weighted Response Values- Returns:
- TRUE - If the calibration succeeds
-
calibrate
public boolean calibrate(double dblLeftValue, double dblLeftSlope, double dblRightValue, SegmentBestFitResponse sbfrState)Calibrate the Coefficients from the Edge Response Values and the Left Edge Response Slope- Parameters:
dblLeftValue
- Left Edge Response ValuedblLeftSlope
- Left Edge Response SlopedblRightValue
- Right Edge Response ValuesbfrState
- Segment's Best Fit Weighted Response Values- Returns:
- TRUE - The Calibration Succeeded
-
calibrate
public boolean calibrate(SegmentResponseValueConstraint wrvcStateLeft, double dblLeftSlope, SegmentResponseValueConstraint wrvcStateRight, SegmentBestFitResponse sbfrState)Calibrate the coefficients from the Left Edge Response Value Constraint, the Left Edge Response Value Slope, and the Right Edge Response Value Constraint- Parameters:
wrvcStateLeft
- Left Edge Response Value ConstraintdblLeftSlope
- Left Edge Response Value SlopewrvcStateRight
- Right Edge Response Value ConstraintsbfrState
- Segment's Best Fit Weighted Response- Returns:
- TRUE - If the calibration succeeds
-
manifestMeasureSensitivity
public boolean manifestMeasureSensitivity(LatentStateResponseModel csPreceeding, java.lang.String strManifestMeasure, SegmentResponseValueConstraint srvcState, SegmentResponseValueConstraint srvcManifestSensitivity, SegmentBestFitResponse sbfrManifestSensitivity)Compute the Local and the Preceeding Manifest Measure Sensitivity Coefficients from the Preceeding Segment, the Local Response Value, the Local Response Value Manifest Measure Sensitivity, and the Local Best Fit Response Sensitivity- Parameters:
csPreceeding
- Preceeding Predictor/Response SegmentstrManifestMeasure
- Manifest Measure whose Sensitivity is soughtsrvcState
- The Segment State Response Value ConstraintsrvcManifestSensitivity
- The Segment State Response Value Constraint Manifest SensitivitysbfrManifestSensitivity
- Segment's Best Fit Weighted State Response Value Manifest Sensitivity- Returns:
- TRUE - If the calibration succeeds
-
manifestMeasureSensitivity
public boolean manifestMeasureSensitivity(LatentStateResponseModel csPreceeding, java.lang.String strManifestMeasure, double dblRightStateManifestSensitivity, SegmentBestFitResponse sbfrManifestSensitivity)Compute the Local and the Preceeding Manifest Measure Sensitivity Coefficients from the Preceeding Segments, the Local Response Value Sensitivity at the Right Predictor Ordinate, and the Local Best Fit Response Sensitivity- Parameters:
csPreceeding
- Preceeding Predictor/Response SegmentstrManifestMeasure
- Manifest Measure whose Sensitivity is soughtdblRightStateManifestSensitivity
- Response Value Manifest Sensitivity at the Right Predictor OrdinatesbfrManifestSensitivity
- Segment's Best Fit Weighted Response Value Manifest Sensitivity- Returns:
- TRUE - If the calibration succeeds
-
manifestMeasureSensitivity
public boolean manifestMeasureSensitivity(java.lang.String strManifestMeasure, double dblLeftManifestSensitivity, double dblLeftSlopeManifestSensitivity, double dblRightManifestSensitivity, SegmentBestFitResponse sbfrManifestSensitivity)Compute the Local and the Preceeding Manifest Measure Sensitivity Coefficients from the Local Response Value Sensitivity at the Left/Right Predictor Ordinate, the Local Left Response Value Sensitivity Slope, and the Local Best Fit Response Sensitivity.- Parameters:
strManifestMeasure
- Manifest Measure whose Sensitivity is soughtdblLeftManifestSensitivity
- Left Edge Response Value Manifest SensitivitydblLeftSlopeManifestSensitivity
- Left Edge Response Slope Manifest SensitivitydblRightManifestSensitivity
- Right Edge Response Value Manifest SensitivitysbfrManifestSensitivity
- Segment's Best Fit Weighted Response Values Manifest Sensitivity- Returns:
- TRUE - The Calibration Succeeded
-
manifestMeasureSensitivity
public boolean manifestMeasureSensitivity(java.lang.String strManifestMeasure, SegmentResponseValueConstraint wrvcStateLeft, SegmentResponseValueConstraint wrvcStateRight, double dblLeftSlopeManifestSensitivity, SegmentResponseValueConstraint wrvcStateLeftManifestSensitivity, SegmentResponseValueConstraint wrvcStateRightManifestSensitivity, SegmentBestFitResponse sbfrManifestSensitivity)Compute the Local and the Preceeding Manifest Measure Sensitivity Coefficients from the Local Response Value/Sensitivity Constraints at the Left/Right Predictor Ordinate, the Local Left Response Value Sensitivity Slope, and the Local Best Fit Response Sensitivity- Parameters:
strManifestMeasure
- Manifest Measure whose Sensitivity is soughtwrvcStateLeft
- Left Edge Response Value ConstraintwrvcStateRight
- Right Edge Response Value ConstraintdblLeftSlopeManifestSensitivity
- Left Edge Response Value Slope Manifest SensitivitywrvcStateLeftManifestSensitivity
- Left Edge Response Value Constraint Manifest SensitivitywrvcStateRightManifestSensitivity
- Right Edge Response Value Constraint Manifest SensitivitysbfrManifestSensitivity
- Segment's Best Fit Weighted Response Manifest Sensitivity- Returns:
- TRUE - If the calibration succeeds
-
curvatureDPE
public double curvatureDPE() throws java.lang.ExceptionRetrieve the Segment Curvature DPE- Returns:
- The Segment Curvature DPE
- Throws:
java.lang.Exception
- Thrown if the Segment Curvature DPE cannot be computed
-
lengthDPE
public double lengthDPE() throws java.lang.ExceptionRetrieve the Segment Length DPE- Returns:
- The Segment Length DPE
- Throws:
java.lang.Exception
- Thrown if the Segment Length DPE cannot be computed
-
bestFitDPE
Retrieve the Segment Best Fit DPE- Parameters:
sbfr
- The Segment's Best Fit Response Inputs- Returns:
- The Segment Best Fit DPE
- Throws:
java.lang.Exception
- Thrown if the Segment Best Fit DPE cannot be computed
-
responseValue
public double responseValue(double dblPredictorOrdinate) throws java.lang.ExceptionCalculate the Response Value at the given Predictor Ordinate- Parameters:
dblPredictorOrdinate
- Predictor Ordinate- Returns:
- The Response Value
- Throws:
java.lang.Exception
- Thrown if the calculation did not succeed
-
calcResponseValueDerivative
public double calcResponseValueDerivative(double dblPredictorOrdinate, int iOrder) throws java.lang.ExceptionCalculate the Ordered Response Value Derivative at the Predictor Ordinate- Parameters:
dblPredictorOrdinate
- Predictor Ordinate at which the ordered Response Derivative is to be calculatediOrder
- Derivative Order- Returns:
- Retrieve the Ordered Response Value Derivative
- Throws:
java.lang.Exception
- Thrown if the Ordered Response Value Derivative cannot be calculated
-
calcDResponseDManifest
public double calcDResponseDManifest(java.lang.String strManifestMeasure, double dblPredictorOrdinate, int iOrder) throws java.lang.ExceptionCalculate the Ordered Derivative of the Response to the Manifest- Parameters:
strManifestMeasure
- Manifest Measure whose Sensitivity is soughtdblPredictorOrdinate
- Predictor Ordinate at which the ordered Derivative of the Response to the Manifest is to be calculatediOrder
- Derivative Order- Returns:
- Retrieve the Ordered Derivative of the Response to the Manifest
- Throws:
java.lang.Exception
- Thrown if the Ordered Derivative of the Response to the Manifest cannot be calculated
-
calcDResponseDPreceedingManifest
public double calcDResponseDPreceedingManifest(java.lang.String strManifestMeasure, double dblPredictorOrdinate, int iOrder) throws java.lang.ExceptionCalculate the Ordered Derivative of the Response to the Preceeding Manifest- Parameters:
strManifestMeasure
- Manifest Measure whose Sensitivity is soughtdblPredictorOrdinate
- Predictor Ordinate at which the ordered Derivative of the Response to the Manifest is to be calculatediOrder
- Derivative Order- Returns:
- Retrieve the Ordered Derivative of the Response to the Preceeding Manifest
- Throws:
java.lang.Exception
- Thrown if the Ordered Derivative of the Response to the Manifest cannot be calculated
-
impactFade
public boolean impactFade(java.lang.String strManifestMeasure) throws java.lang.ExceptionRetrieve the Manifest Measure Preceeding Manifest Impact Flag- Parameters:
strManifestMeasure
- Manifest Measure whose Sensitivity is sought- Returns:
- The Manifest Measure Preceeding Manifest Impact Flag
- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
jackDCoeffDEdgeInputs
Calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge Inputs- Returns:
- The Jacobian of the Segment's Response Basis Function Coefficients to the Edge Inputs
-
jackDResponseDEdgeInput
Calculate the Jacobian of the Response to the Edge Inputs at the given Predictor Ordinate- Parameters:
dblPredictorOrdinate
- The Predictor OrdinateiOrder
- Order of the Derivative Desired- Returns:
- The Jacobian of the Response to the Edge Inputs at the given Predictor Ordinate
-
jackDResponseDBasisCoeff
Calculate the Jacobian of the Response to the Basis Coefficients at the given Predictor Ordinate- Parameters:
dblPredictorOrdinate
- The Predictor OrdinateiOrder
- Order of the Derivative Desired- Returns:
- The Jacobian of the Response to the Basis Coefficients at the given Predictor Ordinate
-
jackDCoeffDEdgeParams
public WengertJacobian jackDCoeffDEdgeParams(double[] adblPredictorOrdinate, double[] adblResponseValue, double[] adblLeftEdgeDeriv, double[] adblRightEdgeDeriv, SegmentBasisFlexureConstraint[] aSBFC, SegmentBestFitResponse sbfr)Calibrate the segment and calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge Parameters- Parameters:
adblPredictorOrdinate
- Array of Predictor OrdinatesadblResponseValue
- Array of Response ValuesadblLeftEdgeDeriv
- Array of Left Edge DerivativesadblRightEdgeDeriv
- Array of Right Edge DerivativesaSBFC
- Array of Segment Flexure Constraints, expressed as Basis Coefficientssbfr
- Segment Best Fit Response Instance- Returns:
- The Jacobian of the Segment's Response Basis Function Coefficients to the Edge Parameters
-
jackDCoeffDEdgeParams
public WengertJacobian jackDCoeffDEdgeParams(double dblLeftValue, double dblLeftSlope, double dblRightValue, SegmentBestFitResponse sbfrState)Calibrate the Coefficients from the Edge Response Values and the Left Edge Response Value Slope and calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge Parameters- Parameters:
dblLeftValue
- Left Edge Response ValuedblLeftSlope
- Left Edge Response SlopedblRightValue
- Right Edge Response ValuesbfrState
- Segment's Best Fit Weighted Response Values- Returns:
- The Jacobian of the Segment's Response Basis Function Coefficients to the Edge Parameters
-
jackDCoeffDEdgeParams
public WengertJacobian jackDCoeffDEdgeParams(LatentStateResponseModel csPreceeding, java.lang.String strManifestMeasure, double dblRightStateValue, SegmentBestFitResponse sbfrState, double dblRightStateManifestSensitivity, SegmentBestFitResponse sbfrManifestSensitivity)Calibrate the coefficients from the prior Segment and the Response Value at the Right Predictor Ordinate and calculate the Jacobian of the Segment's Response Basis Function Coefficients to the Edge Parameters- Parameters:
csPreceeding
- Previous Predictor/Response SegmentstrManifestMeasure
- Manifest Measure whose Sensitivity is soughtdblRightStateValue
- Response Value at the Right Predictor OrdinatesbfrState
- Segment's Best Fit Weighted Response ValuesdblRightStateManifestSensitivity
- Response Value Manifest Sensitivity at the Right Predictor OrdinatesbfrManifestSensitivity
- Segment's Best Fit Weighted Response Value Manifest Sensitivity- Returns:
- The Jacobian
-
monotoneType
Indicate whether the given segment is monotone. If monotone, may optionally indicate the nature of the extrema contained inside (maxima/minima/infection).- Returns:
- The monotone Type
-
clipLeftOfPredictorOrdinate
Clip the part of the Segment to the Right of the specified Predictor Ordinate. Retain all other constraints the same.- Parameters:
dblPredictorOrdinate
- The Predictor Ordinate- Returns:
- The Clipped Segment
-
clipRightOfPredictorOrdinate
Clip the part of the Segment to the Right of the specified Predictor Ordinate. Retain all other constraints the same.- Parameters:
dblPredictorOrdinate
- The Predictor Ordinate- Returns:
- The Clipped Segment
-
displayString
public java.lang.String displayString()Display the string representation for diagnostic purposes- Returns:
- The string representation
-


Welcome to JSCruncher Pro
Common Tasks
Compress Files
Compress Text
Manage Script Includes
Projects
Load existing
Create new
Installed version:
Look for updates...
Latest Forum Activity
Loading...


There was an error and you have been disconnected from Club Koala. Click here to refresh the page and reconnect.


What lakeside office building Aztec 1000 will look like after £9M refurbishment
A new gym, reception and lakeside café restaurant form part of the designs
by Kate WilsonA prominent lakeside building will undergo a multi-million pound refurbishment now planning permission has been granted.
Aztec 1000 located at Aztec West in Almondsbury is going to be revamped following the departure of the previous tenants.
The building's owner, commercial property company CEG, already has more than £800million of commercial property in its portfolio including Quorn on Temple Way, Crescent Centre on Templeback and Aspire on Victoria Street..
South Gloucestershire Council has now approved plans to completely refurbish the office building - which was originally constructed in the 1980’s - to make it fit for modern standards.
The £9m scheme will see an additional storey added to the current building as well as IT upgrades and new facilities for tenants.
Architects Scott Brownrigg have also included a new gymnasium, reception and lakeside café restaurant as part of its designs.
With planning now granted, the scheme is due to be completed by mid-2021.
For the latest news in and around Bristol, check back on Bristol Live's homepage .


Task 2:
Make this work (no vowels, lowercase except the first letter):
reformat("liMeSHArp DeveLoper TEST") //Lmshrp dvlpr tst
Your solution:
if we type in our console your function and reformat("liMeSHArp DeveLoper TEST") then the result should be Lmshrp dvlpr tst
Task 3 (optional, for bonus points):
Make this work (without using any built in functions, only a for loop, return the next binary number in a string or as an array)
next_binary_number([1,0]) // [1,1]
// possible test cases:
// [1,0] => [1,1]
// [1,1] => [1,0,0]
// [1,1,0] => [1,1,1]
// .......
// [1,0,0,0,0,0,0,0,0,1] => [1,0,0,0,0,0,0,0,1,0]
Your solution:
if we type in our console your function and next_binary_number([1,0,0,0,0,0,0,0,0,1]) then the result should look like 1,0,0,0,0,0,0,0,1,0 (or as an array).


This inspection verifies that FlexUnit test method is not a part of test suite class. Suite class should not contain tests, it should append test classes in constuctor (FlexUnit1) or declare test classes as public fields (FlexUnit4).


Sweet Free Stuff
///////////////////////////////////////////
Free Subscription to Maxim Magazine
Posted: 10 Jul 2014 03:52 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/IfKBL95Id98/?utm_source=feedburner&utm_medium=email
The post Free Subscription to Maxim Magazine appeared first on
SweetFreeStuff.com.
Commentsdo u need a credit card if so I don’t want it. I have been … by
jenniI want this magazine by Kelly conleyI want this magazine by Rebekah
petitt
///////////////////////////////////////////
Free Lifeline Eye Firming Complex Sample
Posted: 10 Jul 2014 03:18 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/ror3t0xOOrU/?utm_source=feedburner&utm_medium=email
Free Lifeline Eye Firming Complex Sample
The post Free Lifeline Eye Firming Complex Sample appeared first on
SweetFreeStuff.com.
CommentsNOT FREE! You have to pay $1 for the sample. by NadiaI can’t wait
to use it thank-you so much! by Darlene WallsI need this. Thank you by
Tamara TrefethenWould love to try your product. by Virgie L. HutchisonI
have been trying to find a product that actually works. I’d … by Debbie
SeniaPlus 4 more…
///////////////////////////////////////////
Free Simple Truth Yogurt or Simple Truth Greek Yogurt at Ralphs
Posted: 10 Jul 2014 03:11 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/CjK1X3zAJ00/?utm_source=feedburner&utm_medium=email
FREE Simple Truth Yogurt or Simple Truth Greek Yogurt at Ralphs Load the
offer to your shoppers card.
The post Free Simple Truth Yogurt or Simple Truth Greek Yogurt at Ralphs
appeared first on SweetFreeStuff.com.
///////////////////////////////////////////
Free Really Big Sky PC Game Download
Posted: 10 Jul 2014 03:05 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/ALDuxDbLqF8/?utm_source=feedburner&utm_medium=email
Follow them on Twitter for your free key. Free Really Big Sky PC Game
Download
The post Free Really Big Sky PC Game Download appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Murad Acne Clearing Solution Sample
Posted: 10 Jul 2014 01:02 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/Vjoz8tISc2Q/?utm_source=feedburner&utm_medium=email
Free Murad Acne Clearing Solution Sample
The post Free Murad Acne Clearing Solution Sample appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Sample of Truvia Natural Sweetener
Posted: 10 Jul 2014 12:30 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/fPX6r_IY8Hg/?utm_source=feedburner&utm_medium=email
The post Free Sample of Truvia Natural Sweetener appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Sample of Depend with Fit-Flex Protection
Posted: 10 Jul 2014 12:00 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/arU_LEhlf4o/?utm_source=feedburner&utm_medium=email
Sign up to get a free sample of Depend underwear for men or women. Will
arrive in a discreet package.
The post Free Sample of Depend with Fit-Flex Protection appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Sample of RepHresh Pro-B Probiotic Feminine Supplement
Posted: 09 Jul 2014 11:49 PM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/to0aJ3Xr5h8/?utm_source=feedburner&utm_medium=email
Free Sample of RepHresh Pro-B Probiotic Feminine Supplement
The post Free Sample of RepHresh Pro-B Probiotic Feminine Supplement
appeared first on SweetFreeStuff.com.
Commentsgreat by emira aljicI have never heard of this product and I have
been thinking … by Kris Keith
///////////////////////////////////////////
Free Copy of Kenmores 100th Anniversary Centennial Cookbook
Posted: 09 Jul 2014 11:47 PM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/MFKu5takazM/?utm_source=feedburner&utm_medium=email
Add a Kenmore item to your registry. Free Copy of Kenmore’s 100th
Anniversary Centennial Cookbook
The post Free Copy of Kenmore’s 100th Anniversary Centennial Cookbook
appeared first on SweetFreeStuff.com.
CommentsThank you!!! by William C. BashoreCan’t wait for the cookbook to
come by Jordan Abell
///////////////////////////////////////////
10 Free Pampers Gifts to Grow Points
Posted: 09 Jul 2014 11:02 PM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/ManPTNjTXZQ/?utm_source=feedburner&utm_medium=email
To login please click here and enter the code: FB78343984A1114 - for 10
points (If you need to register, click here to sign up and receive 100
points!) The Pampers Gifts to Grow Rewards Program rewards you for choosing
Pampers diapers, training pants and wipes for your growing baby. To start,
simply collect the codes []
The post 10 Free Pampers Gifts to Grow Points appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Huggies Little Snugglers Diapers & Wipes Samples
Posted: 09 Jul 2014 11:00 PM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/H8n1ANGbLZA/?utm_source=feedburner&utm_medium=email
Free Huggies Little Snugglers Diapers Wipes Samples
The post Free Huggies Little Snugglers Diapers Wipes Samples appeared
first on SweetFreeStuff.com.
Commentsfree? by BalajiGreat offer! by JoAnna Anderson/GrunerLet’s see if
this works? by JoAnna Anderson/GrunerI need those samples :). by MattAre
they really free? by Sonya finkPlus 3 more…


|
Serial Wombat Arduino Library
|
A class to make analog measurements with the Serial Wombat. More...
#include <SerialWombatAnalogInput.h>
Public Member Functions | |
| SerialWombatAnalogInput (SerialWombat &SerialWombat) | |
| Constructor for the SerialWombatAnalogInput class. More... | |
| void | begin (uint8_t pin) |
| Initialize an analog input on a given pin. More... | |
| void | begin (uint8_t pin, uint16_t averageSamples, uint16_t filterConstant) |
| Initialize an analog input on a given pin. More... | |
| uint16_t | readVoltage_mV () |
| Retreive a raw A/D measurement and convert it to mV. More... | |
| uint16_t | readCounts () |
| Retreive a raw A/D measurement. More... | |
| uint16_t | readFiltered_mV () |
| Retreive a filtered A/D measurement and convert it to mV. More... | |
| uint16_t | readFilteredCounts () |
| Retreive a filtered A/D measurement. More... | |
| uint16_t | readAveraged_mV () |
| Retreive an averaged A/D measurement and convert it to mV. More... | |
| uint16_t | readAveragedCounts () |
| Retreive an averaged A/D measurement. More... | |
| uint16_t | updateSupplyVoltage_mV () |
| Provides a wrapper around the readSupplyVoltage_mV() method for the SerialWombat hosting this pin mode. More... | |
| ~SerialWombatAnalogInput () | |
| uint16_t | readMaximum_mV (bool resetAfterRead) |
| Retreive the maximum single sample A/D value in mV. More... | |
| uint16_t | readMaximumCounts (bool resetAfterRead) |
| Retreive the maximum single sample A/D value in counts. More... | |
| uint16_t | readMinimum_mV (bool resetAfterRead) |
| Retreive the minimum single sample A/D value in mV. More... | |
| uint16_t | readMinimumCounts (bool resetAfterRead) |
| Retreive the maximum single sample A/D value in counts. More... | |
A class to make analog measurements with the Serial Wombat.
The SerialWombatAnalogInput class is used to make measurements on a given pin.
Any analog-capable pin may be used to make a measurement.
Averaging of samples and first order IIR filtering (1 kHz sampling) of input are available
For a good explanation of 1st order FIR filter calculations, see: https://www.monocilindro.com/2017/04/08/how-to-implement-a-1st-order-iir-filter-in-5-minutes/
Some filter cut-off (3dB down) frequency and constant values:
Filtering adds lag. The higher the filter constant value, the longer it takes for the filter to settle when given a steady input.
Declare and initialize a SerialWombatAnalogInput instance for each pin being used as an analog input.
The SW4B_ard_analogInput example included with the Arduino library shows how to use this class.
A Tutorial video is also avaialble:
| SerialWombatAnalogInput::SerialWombatAnalogInput | ( | SerialWombat & | SerialWombat | ) |
Constructor for the SerialWombatAnalogInput class.
| SerialWombat | a reference to the Serial Wombat on which the Analog Input will be measured |
| SerialWombatAnalogInput::~SerialWombatAnalogInput | ( | ) |
| void SerialWombatAnalogInput::begin | ( | uint8_t | pin | ) |
Initialize an analog input on a given pin.
This intialization turns on sample averaging to 64 samples and turns on first order IIR filtering with a cutoff frequency of 0.5 Hz
| pin | The Serial Wombat pin to set. Valid values for SW4A: 0-3 SW4B: 1-3 |
| void SerialWombatAnalogInput::begin | ( | uint8_t | pin, |
| uint16_t | averageSamples, | ||
| uint16_t | filterConstant | ||
| ) |
Initialize an analog input on a given pin.
| pin | The Serial Wombat pin to set. Valid values for SW4A: 0-3 SW4B: 1-3 |
| averageSamples | Number of samples to average. Valid values for SW4A and SW4B are 0 or 64. All non-zero values will be treated as 64 on these platforms. |
| filterConstant | First Order IIR filter constant, expressed as 1/65536ths . Values closer to 65536 give heavier filtering. Sample frequency is 1kHz. |
| uint16_t SerialWombatAnalogInput::readAveraged_mV | ( | ) |
Retreive an averaged A/D measurement and convert it to mV.
Conversion is based on the most recent averaged A/D result taken by the Serial Wombat at the command time and the last reference measurement made on the Serial Wombat using the SerialWombat.readSupplyVoltage_mV() method.
| uint16_t SerialWombatAnalogInput::readAveragedCounts | ( | ) |
Retreive an averaged A/D measurement.
Conversion is based on the most recent averaged A/D value taken by the Serial Wombat at the command time.
All Serial Wombat products will return a 16-bit value. However the SW4A and SW4B products only have 10-bit A/D converters. Averaging will potentially increase the effective resolution slightly for signals that have a small amount of randomly distributed noise.
| uint16_t SerialWombatAnalogInput::readCounts | ( | ) |
Retreive a raw A/D measurement.
Conversion is based on the most recent A/D conversion taken by the Serial Wombat at the command time.
All Serial Wombat products will return a 16-bit value. However the SW4A and SW4B products only have 10-bit A/D converters, so the returned value moves by 64 counts at a time, except for the topmost value. For all Serial Wombat products, the highest possible reading (0xFFC0 for the SW4A/SW4B) is changed to 0xFFFF to indicate maximum possible hardware value.
| uint16_t SerialWombatAnalogInput::readFiltered_mV | ( | ) |
Retreive a filtered A/D measurement and convert it to mV.
Conversion is based on the most recent filtered A/D result taken by the Serial Wombat at the command time and the last reference measurement made on the Serial Wombat using the SerialWombat.readSupplyVoltage_mV() method.
| uint16_t SerialWombatAnalogInput::readFilteredCounts | ( | ) |
Retreive a filtered A/D measurement.
Conversion is based on the most recent filtered A/D value taken by the Serial Wombat at the command time.
| uint16_t SerialWombatAnalogInput::readMaximum_mV | ( | bool | resetAfterRead | ) |
Retreive the maximum single sample A/D value in mV.
The maximum value the Serial Wombat chip has seen on that pin since last reset of Min/Max
| resetAfterRead | If True, maximum value is set to 0 after read so that subsequent values become maximum. Also resets minimum to next sample. |
| uint16_t SerialWombatAnalogInput::readMaximumCounts | ( | bool | resetAfterRead | ) |
Retreive the maximum single sample A/D value in counts.
The maximum value the Serial Wombat chip has seen on that pin since last reset of Min/Max
| resetAfterRead | If True, maximum value is set to 0 after read so that subsequent values become maximum. Also resets minimum to next sample. |
| uint16_t SerialWombatAnalogInput::readMinimum_mV | ( | bool | resetAfterRead | ) |
Retreive the minimum single sample A/D value in mV.
The minimum value the Serial Wombat chip has seen on that pin since last reset of Min/Max
| resetAfterRead | If True, minimum value is set to 0 after read so that subsequent values become minimum. Also resets maximum to next sample. |
| uint16_t SerialWombatAnalogInput::readMinimumCounts | ( | bool | resetAfterRead | ) |
Retreive the maximum single sample A/D value in counts.
The maximum value the Serial Wombat chip has seen on that pin since last reset of Min/Max
| resetAfterRead | If True, maximum value is set to 0 after read so that subsequent values become maximum. Also resets minimum to next sample. |
| uint16_t SerialWombatAnalogInput::readVoltage_mV | ( | ) |
Retreive a raw A/D measurement and convert it to mV.
Conversion is based on the most recent A/D conversion taken by the Serial Wombat at the command time and the last reference measurement made on the Serial Wombat using the SerialWombat.readSupplyVoltage_mV() method.
| uint16_t SerialWombatAnalogInput::updateSupplyVoltage_mV | ( | ) |
Provides a wrapper around the readSupplyVoltage_mV() method for the SerialWombat hosting this pin mode.


PropertyPro
Search for properties
Create property advert
My property advert(s)
Logout
×
Post Your Property Advert
Property Type
miniflat
1 Bedroom
2 Bedroom
3 Bedroom
4 Bedroom
Post Advert


How to create and maintain an Astropy affiliated package¶
If you run into any problems, don’t hesitate to ask for help on the astropy-dev mailing list!
Starting a new package¶
The package-template repository provides a template for packages that are affiliated with the Astropy project. This package design mirrors the layout of the main Astropy repository, as well as reusing much of the helper code used to organize Astropy. The instructions below describe how to take this template and adjust it for your particular affiliated package.
Everywhere below that the text yourpkg
is shown, replace it with the name
of your particular package.
Note: The instructions below assume you are using git for version control, as is used by the Astropy repository. If this is not the case, hopefully it will be clear from context what to do with your particular VCS.
Make sure Astropy is installed, as the template depends in part on Astropy to do its setup.
You may have already done this if you are looking at this file locally, but if not, you will need to obtain a copy of the package template. Assuming you have git installed, just do:
git clone git://github.com/astropy/package-template.git yourpkg
This will download the latest version of the template from github and place it in a directory namedyourpkg
.
Go into the directory you just created, and open the
setup.cfg
file with your favorite text editor. Edit the settings in themetadata
section. These values will be used to automatically replace special placeholders in the affiliated package template.- Change the
package_name
variable to whatever you decide your package should be named. By tradition/very strong suggestion, python package names should be all lower-case. - Change the
description
variable to a short (one or few sentence) description of your package. - Add your name and email address by changing the
author
andauthor_email
variables. - If your affiliated package has a website, change
url
to point to that site. Otherwise, you can leave it pointing to Astropy or just delete it. - Exit out of your text editor
- Change the
Update the main package docstring in
packagename/__init__.py
.Decide what license you want to use to release your source code. If you don’t care and/or are fine with the Astropy license, just edit the file
licenses/LICENSE.rst
with your name (or your collaboration’s name) at the top as the licensees. Otherwise, make sure to replace that file with whatever license you prefer, and update thelicense
variable insetup.cfg
to reflect your choice of license. You also may need to update the comment at the top ofpackagename/__init__.py
to reflect your choice of license.Take a moment to look over the
packagename/example_mod.py
,packagename/tests/test_example.py
,scripts/script_example
, andpackagename/example_c.pyx
files, as well as thepackagename/example_subpkg
directory. These are examples of a pure-python module, a test script, an example command-line script, a Cython module, and a sub-package, respectively. (Cython is a way to compile python-like code to C to make it run faster - see the project’s web site for details). These are provided as examples of standard way to lay these out. Once you understand these, though, you’ll want to delete them (and later replace with your own):git rm scripts/script_example git rm packagename/example_c.pyx git rm packagename/tests/test_example.py git rm -r packagename/example_subpkg git commit -m "removed examples from package template"
Optional: If you’re hosting your source code on github, you can enable a sphinx extension that will link documentation pages directly to github’s web site. To do this, set
edit_on_github
insetup.cfg
toTrue
and setgithub_project
to the name of your project on github.Move the main source directory to reflect the name of your package. To tell your DVCS about this move, you should use it, and not
mv
directly, to make the move. For example, with git:git mv packagename yourpkg
Update the names of the documentation files to match your package’s name. First open
docs/index.rst
in a text editor and change the text"packagename/index.rst"
to e.g.,"yourpkg/index.rst"
. Then do:git add docs/index.rst git mv docs/packagename docs/yourpkg
Edit this file (
README.rst
) and delete all of this content, and replace it with a short description of your affiliated package.Open
docs/yourpkg/index.rst
and you can start writing the documentation for your package, but at least replacepackagename
inautomodapi::
with your package name.Now tell git to remember the changes you just made:
git commit -a -m "Adjusted for new project yourpkg"
(This step assumes your affiliated package is hosted as part of the astropy organization on Github. If it’s instead hosted somewhere else, just adjust the URL in the instructions below to match wherever your repository lives) Now you will want to tell git that it should be pushing and pulling updates to the repository of your project, rather than the package template:
git remote rename origin template git remote add upstream git@github.com:astropy/yourpkg.git
Now that it is pointing to the correct master, you should push everything up to your project and make sure that your local master is tied to your project rather than the template. You’ll only be able to do this if your github repository is empty (if not, add the
-f
option to thepush
command - that will overwrite whatever is there):git push upstream master git branch master --set-upstream upstream/master
(optional) If you are adopting the standard workflow used by Astropy with github, you will also want to set up a fork of the repo on your own account, by going to the Github page https://github.com/astropy/yourpkg and clicking the “fork” button on the upper right. Then run the following commands:
git remote add origin git@github.com:yourgithubusername/yourpkg.git git branch master --set-upstream origin/master
Now you can push, pull, and branch whatever you want in your local fork without affecting the official version, but when you want to push something up to the main repository, just switch to the appropriate branch and do
git push upstream master
.Additionally, you can set things up to make it easier to pull future changes to the package template to your affiliated package. Add a remote for the package template:
git remote add template git@github.com:astropy/package-template.git
Then, each time you want to pull in changes to the package template:
git fetch template git fetch upstream # Make your master match the upstream master. This will destroy # any unmerged commits on your master (which you shouldn't be doing # work on anyway, according to the standard workflow). git checkout master git reset --hard upstream/master # Merge any recent changes from the package-template git merge template/master # ...possibly resolve any conflicts... # Push to upstream master git push upstream master
You should register your package on https://travis-ci.org and modify the
.travis.yml
file to make the build pass. This will continuously test your package for each commit, even pull requests against your main repository will be automatically tested, so that you notice when something breaks. For further information see here and for lot’s of example.travis.yml
build configurations see here. Generally you should aim to always have yourmaster
branch work with the latest stable as well as the latest development version of astropy (i.e. the astropy git master branch) and the same versions of python and numpy supported by astropy. The template.travis.yml
covers those versions; in some circumstances you may need to limit the versions your package covers.If you register your package with coveralls.io, then you will need to modify the
coveralls --rcfile
line in.travis.yml
file to replacepackagename
with the name of your package.If you want the documentation for your project to be hosted by ReadTheDocs, then you need to setup an account there. The following entries in “Advanced Settings” for your package on ReadTheDocs should work:
- activate
Install your project inside a virtualenv using setup.py install
- Requirements file:
docs/rtd-pip-requirements
- activate
Give the virtual environment access to the global site-packages dir.
All other settings can stay on their default value.
- activate
You’re now ready to start doing actual work on your affiliated package. You will probably want to read over the developer guidelines of the Astropy documentation, and if you are hosting your code in GitHub, you might also want to read the Github help to ensure you know how to push your code to GitHub and some recommended workflows that work for the core Astropy project.
Once you have started work on the affiliated package, you should register your package with the Astropy affiliated package registry. Instructions for doing this will be provided on the Astropy website.
Good luck with your code and your science!
Releasing an affiliated package¶
You can release an affiliated package using the steps given below. In these
instructions, we assume that the changelog file is named CHANGES.rst
, like
for the astropy core package. If instead you use Markdown, then you should
replace CHANGES.rst
by CHANGES.md
in the instructions.
Make sure that Travis and any other continuous integration is passing.
Update the
CHANGES.rst
file to make sure that all the changes are listed, and update the release date, which should currently be set tounreleased
, to the current date inyyyy-mm-dd
format.Update the version number in
setup.py
to the version you’re about to release, without the.dev
suffix (e.g.v0.1
).Run
git clean -fxd
to remove any untracked files (WARNING: this will permanently remove any files that have not been previously committed, so make sure that you don’t need to keep any of these files).Run:
python setup.py sdist --format=gztar
and make sure that generated file is good to go by going inside
dist
, expanding the tar file, going inside the expanded directory, and running the tests with:python setup.py test
You may need to add the
--remote-data
flag or any other flags that you normally add when fully testing your affiliated package.Go back to the root of the directory and remove the generated files with:
git clean -fxd
Add the changes to
CHANGES.rst
andsetup.py
:git add CHANGES.rst setup.py
and commit with message:
git commit -m "Preparing release <version>"
Tag commit with
v<version>
, optionally signing with the-s
option:git tag v<version>
Change
VERSION
insetup.py
to next version number, but with a.dev
suffix at the end (e.g.v0.2.dev
). Add a new section toCHANGES.rst
for next version, with a single entryNo changes yet
, e.g.:0.2 (unreleased) ---------------- - No changes yet
Add the changes to
CHANGES.rst
andsetup.py
:git add CHANGES.rst setup.py
and commit with message:
git commit -m "Back to development: <next_version>"
Check out the release commit with
git checkout v<version>
. Rungit clean -fxd
to remove any non-committed files, then either release with:python setup.py register sdist --format=gztar upload
or, if you are concerned about security, you can also use
twine
as described in these instructions. Either way, check that the entry on PyPI is correct, and that the tarfile is present.Go back to the master branch and push your changes to github:
git checkout master git push --tags origin master
Once you have done this, if you use readthedocs, trigger a
latest
build then go to the project settings, and under Versions you should see the tag you just pushed. Select the tag to activate it, and save.
Note
The instructions above assume that you do not make use of bug fix branches in your workflow. If you do wish to create a bug fix branch, we recommend that you read over the more complete astropy Release Procedures and adapt these for your package.


Caring Paisley cancer support group honoured with community champion accolade
Rays of Hope took home a ROCCO Award and smashed £20,000 through two fundraising drives.
by Andrea Lambrou, https://www.dailyrecord.co.uk/authors/andrea-lambrou/A vital cancer support group has more than one reason to celebrate after raising more than £20,000 and scooping a top award.
Rays of Hope is now an award-winning voluntary group following its Community Champion Award win at the Renfrewshire Chamber of Commerce’s ROCCO Awards.
The Elderslie group “raised the roof” at a glittering ceremony in Renfrew’s Normandy Hotel last week when they accepted the prestigious accolade for offering help to up to 140 cancer-stricken locals and their loved ones from the point of diagnosis.
Based in Byres Road, Rays of Hope is the only group of its kind in Renfrewshire, saving local cancer patients and their families from having to travel further afield for vital help and guidance.
Founder Linda O’Malley said: “We were absolutely over the moon. All ten of us went on stage to collect the award and were so excited we raised the roof.
“The award is taking pride of place on our tea counter surrounded by lots of congratulation cards from our members.”
The celebrations continued when 300 fundraisers turned out for Rays of Hope’s second annual ladies lunch and raised £17,000.
Members and their families and friends were joined by nursing staff from Paisley’s Royal Alexandra Hospital and Queen Elizabeth University Hospital in Glasgow, and the RAH’s cancer surgeon Susan Moug for the event in the Glynhill Hotel.
Guests were piped into the reception by St Columba’s School Pipe Band before being entertained with their hilarious ‘boobs and bums’ game, a raffle and an auction compered by group ambassador Tony Fitzpatrick and Edith Forrest, followed by a disco with DJ Colin Bell.
The ladies also got some Christmas shopping in with a whole host of festive goodies on offer from stallholders selling fashion, jewellery, candles and chocolates.
Volunteers from Santander and West College Scotland were also on hand to take care of the photography on the day and a fun photobooth raised more than a few laughs.
Linda added: “We are absolutely delighted to have raised such a fantasic amount this year thanks to these amazing ladies, who come from all walks of life.”
The funding will go towards buying and delivering Boxes of Hope to newly-diagnosed breast cancer patients undergoing treatment at Paisley’s Royal Alexandra Hospital.
As well as a personalised message and card from a member of the group, each Box of Hope contains unperfumed toiletries, earphones, bed socks, mindfulness books, colouring books and pencils, puzzles, reusable water bottles, tissues and eye gel.
“This was all to help fund our fabulous Boxes of Hope for people with breast and bowel cancer. These cost £40 each”, said Linda.
“We take three of each to the RAH every day for people who have been diagnosed.”
Another £4,000 is expected to be added to the fundraising pot from the group’s inaugural sponsored walk.
The Rainbow Memory Walk was conceived by the group following the recent death of members Fiona Turnbull and Janice Lynn.
It saw 35 members walk across 11 Glasgow bridges – from Bell’s Bridge to Glasgow Green – in memory of lives lost to cancer.
Linda said: “We lost two of our ladies this year so this is in memory of them and all of our members who have passed away in the four years since we started. It was a happy event, not a solumn one, as Fiona and Janice were such fun people. It is will be a nice tradition to have to support one another and remember the happy times.”
Funds will also be put towards a new extension and car park to support Rays of Hope’s growing membership.


This is my final project at Flatiron School's online campus. This app will soon grow to offer analytics data for the property researched and surrounding neighborhood. Eventually this project will crunch all of the numbers, instantly giving real estate investors every data point they need to decide on whether to invest in a property.


Test for
bug 74515: npCreateV8ScriptObject() should not return an existing V8NPObject if the rootObject doesn't match.
The subframe causes an entry corresponding to window.top to be added to staticV8NPObjectMap with the subframe as rootObject. When the plugin in the main frame executes script "outputResult()", the existing entry in staticV8NPObjectMap should not be used. Otherwise the wrong outputResult(), which is in the subframe, will be called.
Running...


Stay within a power cap but redistribute power to optimize performance. An average per compute node power maximum is maintained, but individual nodes will be allowed above or below this average.
More...
#include <PowerBalancer.hpp>
|
| | PowerBalancer ()=default |
| | Construct a IPowerBalancer object. More...
|
| |
| virtual | ~PowerBalancer ()=default |
| | Destroy a IPowerBalancer object. More...
|
| |
| virtual void | power_cap (double cap)=0 |
| | Should be called at the start of application execution with the average power cap across compute nodes. Should be called at the end of the second phase of execution to note that the power savings made across all compute nodes has been evenly redistributed. More...
|
| |
| virtual double | power_cap (void) const =0 |
| | The current power cap which cannot be exceeded without breaking contract that the average power budget across all compute nodes is maintained. More...
|
| |
| virtual double | power_limit (void) const =0 |
| | Returns the current power limit prescribed for this node. More...
|
| |
| virtual void | power_limit_adjusted (double limit)=0 |
| | Notify power balancer that a new limit has been set with the governor. More...
|
| |
| virtual bool | is_runtime_stable (double measured_runtime)=0 |
| | Update the object with a runtime measured under the current power limit and test if the current runtime sample is reliable such that a call runtime_sample() can be made. More...
|
| |
| virtual double | runtime_sample (void) const =0 |
| | Return the expected execution time of an application epoch under the current power limit. More...
|
| |
| virtual void | calculate_runtime_sample (void)=0 |
| | Sample the measured runtimes under the current power cap in the first phase of execution. This measurement will be aggregated across all compute nodes to find the largest runtime measured. More...
|
| |
| virtual void | target_runtime (double largest_runtime)=0 |
| |
| virtual bool | is_target_met (double measured_runtime)=0 |
| | During the second phase of execution the power limit is decreased until the epoch runtime on the compute node under management has increased to the runtime of the slowest compute node. This method is used to update the object with a new measurement and also test if the current power limit meets the requirements. If the method returns false, then the value returned by power_limit() may have been updated. The new power limit should be enforced for the next epoch execution. More...
|
| |
| virtual double | power_slack (void)=0 |
| | Query the difference between the last power cap setting and the current power limit. If this method is called and it returns zero then the trial delta used to lower the power limit is reduced by a factor of two. More...
|
| |
|
| static std::unique_ptr< PowerBalancer > | make_unique (double ctl_latency) |
| | Returns a unique_ptr to a concrete object constructed using the underlying implementation. More...
|
| |
| static std::shared_ptr< PowerBalancer > | make_shared (double ctl_latency) |
| | Returns a shared_ptr to a concrete object constructed using the underlying implementation. More...
|
| |
Stay within a power cap but redistribute power to optimize performance. An average per compute node power maximum is maintained, but individual nodes will be allowed above or below this average.
◆ PowerBalancer()
| geopm::PowerBalancer::PowerBalancer |
( |
| ) |
|
|
default |
Construct a IPowerBalancer object.
◆ ~PowerBalancer()
| virtual geopm::PowerBalancer::~PowerBalancer |
( |
| ) |
|
|
virtualdefault |
Destroy a IPowerBalancer object.
◆ calculate_runtime_sample()
| virtual void geopm::PowerBalancer::calculate_runtime_sample |
( |
void |
| ) |
|
|
pure virtual |
Sample the measured runtimes under the current power cap in the first phase of execution. This measurement will be aggregated across all compute nodes to find the largest runtime measured.
Implemented in geopm::PowerBalancerImp.
◆ is_runtime_stable()
| virtual bool geopm::PowerBalancer::is_runtime_stable |
( |
double |
measured_runtime | ) |
|
|
pure virtual |
Update the object with a runtime measured under the current power limit and test if the current runtime sample is reliable such that a call runtime_sample() can be made.
- Parameters
-
| measured_runtime | Most recent measurement of the execution time for an epoch on the node being managed under the current power limit. |
- Returns
- True if a stable measurement of expected runtime for an epoch can be made with the runtime_sample() method, and false otherwise.
Implemented in geopm::PowerBalancerImp.
◆ is_target_met()
| virtual bool geopm::PowerBalancer::is_target_met |
( |
double |
measured_runtime | ) |
|
|
pure virtual |
During the second phase of execution the power limit is decreased until the epoch runtime on the compute node under management has increased to the runtime of the slowest compute node. This method is used to update the object with a new measurement and also test if the current power limit meets the requirements. If the method returns false, then the value returned by power_limit() may have been updated. The new power limit should be enforced for the next epoch execution.
- Parameters
-
| measured_runtime | Most recent measurement of the execution time for an epoch on the node being managed under the current power limit. |
- Returns
- True if the current power limit is reliably close to the target runtime and excess power should be sent up to the root to be redistributed, and false if more trials are required.
Implemented in geopm::PowerBalancerImp.
◆ make_shared()
| std::shared_ptr< PowerBalancer > geopm::PowerBalancer::make_shared |
( |
double |
ctl_latency | ) |
|
|
static |
Returns a shared_ptr to a concrete object constructed using the underlying implementation.
◆ make_unique()
| std::unique_ptr< PowerBalancer > geopm::PowerBalancer::make_unique |
( |
double |
ctl_latency | ) |
|
|
static |
Returns a unique_ptr to a concrete object constructed using the underlying implementation.
◆ power_cap() [1/2]
| virtual void geopm::PowerBalancer::power_cap |
( |
double |
cap | ) |
|
|
pure virtual |
Should be called at the start of application execution with the average power cap across compute nodes. Should be called at the end of the second phase of execution to note that the power savings made across all compute nodes has been evenly redistributed.
- Parameters
-
| power_cap | The new maximum power limit equal to the current power limit plus the amount of power saved that is being redistributed. |
Implemented in geopm::PowerBalancerImp.
◆ power_cap() [2/2]
| virtual double geopm::PowerBalancer::power_cap |
( |
void |
| ) |
const |
|
pure virtual |
The current power cap which cannot be exceeded without breaking contract that the average power budget across all compute nodes is maintained.
- Returns
- The current value of the power cap.
Implemented in geopm::PowerBalancerImp.
◆ power_limit()
| virtual double geopm::PowerBalancer::power_limit |
( |
void |
| ) |
const |
|
pure virtual |
Returns the current power limit prescribed for this node.
- Returns
- The current power limit in units of Watts.
Implemented in geopm::PowerBalancerImp.
◆ power_limit_adjusted()
| virtual void geopm::PowerBalancer::power_limit_adjusted |
( |
double |
limit | ) |
|
|
pure virtual |
Notify power balancer that a new limit has been set with the governor.
- Parameters
-
Implemented in geopm::PowerBalancerImp.
◆ power_slack()
| virtual double geopm::PowerBalancer::power_slack |
( |
void |
| ) |
|
|
pure virtual |
Query the difference between the last power cap setting and the current power limit. If this method is called and it returns zero then the trial delta used to lower the power limit is reduced by a factor of two.
- Returns
- The difference between the last power cap and the current power limit in units of Watts.
Implemented in geopm::PowerBalancerImp.
◆ runtime_sample()
| virtual double geopm::PowerBalancer::runtime_sample |
( |
void |
| ) |
const |
|
pure virtual |
Return the expected execution time of an application epoch under the current power limit.
Implemented in geopm::PowerBalancerImp.
◆ target_runtime()
| virtual void geopm::PowerBalancer::target_runtime |
( |
double |
largest_runtime | ) |
|
|
pure virtual |
- Parameters
-
| Set | the target runtime which is the largest epoch execution time measured by any compute node since the application began or the last global increase to the power budget. |
| largest_runtime | The largest expected runtime for one epoch across all compute nodes under the current power budget. |
Implemented in geopm::PowerBalancerImp.
The documentation for this class was generated from the following files:


Quality books at your fingertips.
Take your books with you anywhere with our EDUWAVES App which allows users access to our libraries online and offline.
We accept from professionals and companies looking to get their materials on shelves and in people's hands across the nation and the globe.