## estimation – Software for handling estimates of new projects

As part of my job I frequently provide estimates for bids and new contracts. I’m quite comfortable with that and how to arrive at some (hopefully) sensible numbers. However, the tooling to support such a job is very limited. Currently it’s all spreadsheets (sales has some really fancy ones), which isn’t ideal. I’ve looked around for supporting software, but all I can find seems to target construction businesses. I’m however looking for something targeting estimating of programming tasks. Are there any better solutions out there than relying on spreadsheets?

Posted on

## real analysis – Estimation of the \$ell^2\$-norm for a sequence \$(a_n/n)_n\$.

If I have a sequence $$mathbf{a} = (a_n)_n in ell^2(mathbb{R}^4)$$, what can I say about the sequence $$mathbf{b} = (tfrac{a_n}{n})_n$$ in terms of $$||mathbf{a}||_{ell^2}$$? It is clear that $$||mathbf{b}||_{ell^2} leq ||mathbf{a}||_{ell^2}$$. However, I need something like $$||mathbf{b}||_{ell^2} leq epsilon ||mathbf{a}||_{ell^2}$$, for example $$epsilon = 3/4$$. Is that possible? Or in other words, is there a sharper bound than $$||mathbf{a}||_{ell^2}$$?. The only additional information I have is that $$(n a_n)_n in ell^2(mathbb{R}^4)$$.

Posted on

## dynamic – Estimation of parameters of limit cycles for systems of high-order differential equations (n> = 3)

There is a system of differential equations: Then, call the limit cycle the projection of the phase trajectory onto the plane in a pairwise combination of state variables ($$x-y,y-z,x-z$$).

where $$x,y,z$$ – state variables, $$a,b,c$$ – constants.

Is it possible to use Mathematica to estimate the amplitude and frequency of the limit cycle? (it is possible by approximate numerical methods, most importantly, not graphical).

Posted on

## optical – Estimation of the camera focus plane via a thin lens equation

I have a camera that generates a JSON file for each image taken. In the JSON file, I can find the camera-specific acquisition settings as well as the photo-specific settings used. The problem is that I want to estimate the focus plane distance of a photo exactly, so I want to use the JSON file to do it. Assuming the thin lens equation is true,

1 / f = 1 / {z_o} + 1 / {z_i}

where o is the real object and i is the image.

Resolution of {z_o} I would expect to get the distance in front of the camera in which the camera is focused.

Based on what I focused on, the focus plane should be 10 to 20 cm in front of the camera. Looking for the settings in the JSON file, I find a focal length setting which, depending on the camera display, was 69mm (after taking into account the cropping factor of 3.19), and what I assume to be the distance to the microlens sensor with the exitPupilOffset parameter. Plug these values ​​in, I end up getting

z_0 = 29 mm

I guess the values ​​given in the JSON are expressed in meters, in which case the answer is far from knowing how far the object is actually. Am I interpreting the JSON incorrectly, is there a possibility that my JSON file is just unscaled or is the exitPupilOffset parameter not the distance between the ; main objective and microlens?

Internal diagram of the camera. For all intents and purposes, just assume that the microlens is the array of sensors since they are at a fixed distance from the actual sensor and do not change from one photo to another. According to JSON, the microlens is 37 µm in front of the sensor.

JSON attached.

``````  {
"picture": {
"dcfDirectory": "100PHOTO",
"dcfFile": "IMG_1010",
"totalFrames": 1,
"frameIndex": 0
},
"generator": "lightning",
"settings": {
"flash": {
"exposureCompensation": 0.0,
"curtainTriggerSync": "front",
"zoomMode": "auto",
"mode": "unknown",
"afAssistMode": "auto"
},
"focus": {
"roi": (
{
"top": 0.0,
"right": 1.0,
"left": 0.0,
"bottom": 1.0
}
),
"afDriveMode": "manual",
"bracketCount": 3,
"bracketOffset": 0.0,
"bracketStep": 3.0,
"bracketEnable": false,
"mode": "auto",
"afActuationMode": "single",
"ringLock": false,
"captureLambda": -4.0
},
"zoom": {
"ringLock": false
},
"shutter": {
"driveMode": "single",
"selfTimerEnable": false,
"selfTimerDuration": 10.0
},
"depth": {
"histogram": "off",
"assist": "off",
"overlay": "off"
},
"whiteBalance": {
"cct": 2917,
"tint": -14.0,
"mode": "auto"
},
"exposure": {
"bracketCount": 3,
"meter": {
"roiMode": "af",
"roi": (
{
"top": 0.0,
"right": 1.0,
"left": 0.0,
"bottom": 1.0
}
),
"mode": "evaluative"
},
"bracketOffset": 0.0,
"bracketStep": 1.0,
"compensation": -2.0606489181518555,
"bracketEnable": false,
"mode": "manual",
"aeLock": false
}
},
"image": {
"pixelPacking": {
"bitsPerPixel": 10,
"endianness": "little"
},
"orientation": 1,
"color": {
"ccm": (
2.0307798385620117,
-0.574540913105011,
-0.45623892545700073,
-0.5976311564445496,
1.8244290351867676,
-0.22679781913757324,
-0.7936299443244934,
-1.610772967338562,
3.404402732849121
),
"whiteBalanceGain": {
"r": 1.0,
"b": 1.8171261548995972,
"gr": 1.0173076391220093,
"gb": 1.0173076391220093
}
},
"height": 5368,
"width": 7728,
"pixelFormat": {
"black": {
"r": 65,
"b": 65,
"gr": 65,
"gb": 65
},
"white": {
"r": 1023,
"b": 1023,
"gr": 1023,
"gb": 1023
},
"rightShift": 0
},
"modulationExposureBias": -0.2632111608982086,
"iso": 125,
"originOnSensor": {
"y": 0,
"x": 0
},
"limitExposureBias": 0.0,
"mosaic": {
"tile": "r,gr:gb,b",
"upperLeftPixel": "gr"
}
},
"devices": {
"shutter": {
"pixelExposureDuration": 0.050014421343803406,
"maxSyncSpeed": 0.004,
"frameExposureDuration": 0.050014421343803406,
"mechanism": "focalPlaneCurtain"
},
"mla": {
"scaleFactor": {
"y": 1.000274658203125,
"x": 1.0
},
"lensPitch": 2e-05,
"sensorOffset": {
"y": 1.3719854354858398e-06,
"x": 3.7586116790771486e-06,
"z": 3.7e-05
},
"rotation": 0.0004427027015481144,
"tiling": "hexUniformRowMajor",
"config": "com.lytro.mla.3"
},
"accelerometer": {
"samples": (
{
"y": 9.672821044921875,
"x": -0.8846282958984375,
"z": 0.53753662109375,
"time": 0.0
}
)
},
"clock": {
"isTimeValid": true,
"zuluTime": "2019-06-21T22:30:09.765Z"
},
"battery": {
"cycleCount": 13,
"model": "B01-3760",
"make": "Lytro",
"chargeLevel": 96
},
"lens": {
"fNumber": 2.1714898266121816,
"focalLength": 0.02165041380790351,
"opticalCenterOffset": {
"y": -3.0073242669459432e-06,
"x": -7.64151627663523e-05
},
"infinityLambda": 51.51889459300562,
"focusStep": 289,
"zoomStep": -222,
"exitPupilOffset": {
"z": 0.08305148315429688
}
},
"sensor": {
"analogGain": {
"r": 1.5625,
"b": 1.5625,
"gr": 1.5625,
"gb": 1.5625
},
"pixelWidth": 7728,
"perCcm": (
{
"ccm": (
2.006272077560425,
-0.5362802147865295,
-0.46999192237854004,
-0.6019303798675537,
1.836044430732727,
-0.23411400616168976,
-0.8173090815544128,
-1.6435128450393677,
3.4608218669891357
),
"cct": 2850.0
},
{
"ccm": (
2.4793264865875244,
-1.2747985124588013,
-0.20452789962291718,
-0.5189455151557922,
1.6118407249450684,
-0.09289517253637314,
-0.3602483570575714,
-1.0115599632263184,
2.3718082904815674
),
"cct": 4150.0
},
{
"ccm": (
2.1902196407318115,
-1.0231428146362305,
-0.16707684099674225,
-0.4134329855442047,
1.7654914855957031,
-0.3520585000514984,
-0.18222910165786743,
-0.7082417607307434,
1.8904708623886108
),
"cct": 6500.0
}
),
"bitsPerPixel": 10,
"baseIso": 80,
"pixelPitch": 1.4e-06,
"normalizedResponses": (
{
"cct": 5100,
"r": 0.7512235641479492,
"b": 0.7596154808998108,
"gb": 1.0,
"gr": 1.0
}
),
"pixelHeight": 5368,
"mosaic": {
"tile": "r,gr:gb,b",
"upperLeftPixel": "gr"
}
}
},
"camera": {
"make": "Lytro, Inc.",
"firmware": "2.0.0 (42)",
"model": "ILLUM"
},
"algorithms": {
"ae": {
"roi": "followAf",
"computed": {
"ev": 1.5625
},
"mode": "live"
},
"awb": {
"roi": "fullFrame",
"computed": {
"cct": 2917,
"gain": {
"r": 1.0,
"b": 1.8171261548995972,
"gr": 1.0173076391220093,
"gb": 1.0173076391220093
}
}
},
"af": {
"roi": "focusRoi",
"computed": {
"focusStep": 289
}
}
},
"schema": "http://schema.lytro.com/lfp/lytro_illum_public/1.3.5/lytro_illum_public_schema.json"
``````

Posted on

## Estimation of the integral of a non-negative integrable function via the measurement of the integration domain

I was trying to solve a probability theory exercise and wondered if the following was true:

Let $$( Omega, mathfrak {A}, mu)$$ to be a measurement space, $$A in mathfrak {A}$$ and $$f in L ^ 1 ( mu)$$ not negative. Then we have this $$int_ mu { chi_A f text {d} omega} leq mu (A) || f || _ {L ^ 1 ( mu)}$$.

I tried to find a counterexample on the real line, but I couldn't find one. Maybe there is one really easy one that I overlooked. I tried to prove the inequality but I couldn't find the right approach. I tried to argue via the step by step functions, but it doesn't seem to work. Perhaps it is necessary to limit oneself to finite measures for the above to be true. Any help is appreciated.

Posted on

## performances – Bootstrap block estimation in Java – Part 2

The following is my attempt to parallelize (I learned parallel computing over the past weekend, so I'm very new) and to make the code more efficient in my previous question Block Bootstrap Estimation using Java. The text file text.txt can be found at https://drive.google.com/open?id=1vLBoNmFyh4alDZt1eoJpavuEwWlPZSKX (please download the file directly if you wish to test it; there are strange things about it that you will not choose not even in Notepad). This is a small 10×10 dataset with `maxBlockSize = 10`, but this must evolve up to twenty 5000 x 3000 datasets with `maxBlockSize = 3000`, just to get an idea of ​​the scale.

``````import java.io.FileInputStream;
import java.lang.Math;
import java.util.Scanner;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.FileOutputStream;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.DoubleStream;

public class BlockBootstrapTestParallel {

// Sum of a subarray, based on B(x, i, L) -- i is one-indexing
public static double sum(double() x, int i, int L) {
return IntStream.range(i, i + L)
.parallel()
.mapToDouble(idx -> x(idx - 1))
.sum();
}

// Mean of a subarray, based on B(x, i, L) -- i is one-indexing
public static double mean(double() x, int i, int L) {
return IntStream.range(i, i + L)
.parallel()
.mapToDouble(idx -> x(idx - 1))
.average()
.orElse(0);
}

// Compute MBB mean
public static double mbbMu(double() x, int L) {
return IntStream.range(0, x.length - L + 1)
.parallel()
.mapToDouble(idx -> mean(x, idx + 1, L))
.average()
.orElse(0);
}

// Compute MBB variance
public static double mbbVariance(double() x, int L, double alpha) {
return IntStream.range(0, x.length - L + 1)
.parallel()
.mapToDouble(idx -> (Math.pow(L, alpha) * Math.pow(mean(x, idx + 1, L) - mbbMu(x, L), 2)))
.average()
.orElse(0);
}

// Compute NBB mean
public static double nbbMu(double() x, int L) {
return IntStream.range(0, x.length / L)
.parallel()
.mapToDouble(idx -> (mean(x, 1 + ((idx + 1) - 1) * L, L)))
.average()
.orElse(0);
}

// Compute NBB variance
public static double nbbVariance(double() x, int L, double alpha) {

double varSum = IntStream.range(0, x.length / L)
.parallel()
.mapToDouble(idx -> (Math.pow(mean(x, 1 + ((idx + 1) - 1) * L, L) - nbbMu(x, L), 2)))
.average()
.orElse(0);

return Math.pow((double) L, alpha) * varSum;

}

// factorial implementation
public static double factorial(int x) {
double() fact = {1.0, 1.0, 2.0, 6.0, 24.0, 120.0, 720.0, 5040.0, 40320.0, 362880.0, 3628800.0};
return fact(x);
}

// Hermite polynomial
public static double H(double x, int p) {
double out = 0;
for (int i = 0; i < (p / 2) + 1; i++) {
out += Math.pow(-1, i) * Math.pow(x, p - (2 * i)) /
((factorial(i) * factorial(p - (2 * i))) * (1L << i));
}
out *= factorial(p);
return out;
}

// Row means
public static double() rowMeans(double()() x, int nrows, int ncols) {
double() means = new double(nrows);
for (int i = 0; i < nrows; i++) {
means(i) = mean(x(i), 1, ncols);
}
return means;
}

public static void duration(long start, long end) {
System.out.println("Total execution time: " + (((double)(end - start))/60000) + " minutes");
}

public static void main(String() argv) throws IOException {
final long start = System.currentTimeMillis();
FileInputStream fileIn = new FileInputStream("test.txt");
FileOutputStream fileOutMBB = new FileOutputStream("MBB_test.txt");
FileOutputStream fileOutNBB = new FileOutputStream("NBB_test.txt");
FileOutputStream fileOutMean = new FileOutputStream("means_test.txt");

Scanner scnr = new Scanner(fileIn);
PrintWriter outFSMBB = new PrintWriter(fileOutMBB);
PrintWriter outFSNBB = new PrintWriter(fileOutNBB);
PrintWriter outFSmean = new PrintWriter(fileOutMean);

// These variables are taken from the command line, but are inputted here for ease of use.
int rows = 10;
int cols = 10;
int maxBlockSize = 10; // this could potentially be any value <= cols
int p = 1;
double alpha = 0.1;
double()() timeSeries = new double(rows)(cols);

// read in the file, and perform the H_p(x) transformation
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
timeSeries(i)(j) = H(scnr.nextDouble(), p);
}
scnr.next(); // skip null terminator
}

// row means
double() sampleMeans = rowMeans(timeSeries, rows, cols);
for (int i = 0; i < rows; i++) {
outFSmean.print(sampleMeans(i) + " ");
}
outFSmean.println();
outFSmean.close();

for (int j = 0; j < rows; j++) {
for (int m = 0; m < maxBlockSize; m++) {
outFSMBB.print(mbbVariance(timeSeries(j), m + 1, alpha) + " ");
}
outFSMBB.println();
}
outFSMBB.close();
}).start();

for (int j = 0; j < rows; j++) {
for (int m = 0; m < maxBlockSize; m++) {
outFSNBB.print(nbbVariance(timeSeries(j), m + 1, alpha) + " ");
}
outFSNBB.println();
}
outFSNBB.close();
}).start();
duration(start, System.currentTimeMillis());
}
}
``````

If useful, I have 8 cores available with 64 GB of RAM, as well as two GPUs that I don't know how to use (Intel UHD Graphics 630, NVIDIA Quadro P620). I will see how to use them in the next few days if I have to.

Posted on

## nt.number theory – The multiplicative constant in the estimation of \$ S_a (x) = sum_ {n leq x} d (n) ^ a \$

Let $$a$$ be a real positive constant and let $$d (n)$$ denote the number of divisors of $$n.$$ To define
$$S_a (x) = sum_ {n leq x} d (n) ^ a.$$
For $$a = 1,$$ the following is well known
$$S_1 (x) = sum_ {n leq x} d (n) = x log x + (2 gamma -1) x + { cal O} ( sqrt {x})$$
while for more general $$a$$, we have
$$S_a (x) sim C (a) x ( log x) ^ {2 ^ a -1}$$ or
$$C (a) = Gamma (2 ^ a) ^ {- 1} prod_p left (1 – frac {1} {p} right) ^ {2 ^ a} left ( sum_ {k geq 0} frac {(k + 1) ^ a} {p ^ k} right).$$
I wonder precise estimates of the constant $$C (a),$$ especially for $$a in (0,1).$$

In particular, an inefficient direct calculation using Mathematica gives that for $$n = 10 ^ i$$, as $$i$$ varies from 1 to 7, we have the estimates

$$widehat {C (1/2)} _ {n = 10 ^ 2} about 0.824636,$$

and $$widehat {C (1/2)} _ {n = 10 ^ 4} about 0.723329,$$

and
$$widehat {C (1/2)} _ {n = 10 ^ 7} about 0.649407.$$

Is something general known about these numerical values. In particular, is it possible to note a positive lower bound for $$C (a)$$ or $$a in (0,1).$$

Posted on

## objective – distance estimation – Photography Stack Exchange

Knowing the dimensions of the plane and the boat in this photo, could we estimate the height of the plane above the water?

Could we estimate the distance to the boat and the plane, then estimate the focal length of the lens, then do a 3D reconstruction like this?

(Are there tags related to photogrammetry?) Posted on

## reference request – Rigorous error estimation semi-discrete heat equation

Let $$Omega$$ to be a Lipschitz domain delimited in $$mathbb R ^ N$$ and $$u_h$$ to be a solution of
$$begin {cases} partial_t u_h – Delta_h u_h = f & text {in} Omega \ u_h = 0 & text {in} partial Omega end {cases}$$ or $$Delta_h$$ is the finite difference approximation of the Laplace operator.
How to estimate the error $$Vert u_h – u Vert_ {L ^ infty ( bar Omega)}$$, or $$u$$ is the solution of $$begin {cases} partial_t u – Delta u = f & text {in} Omega \ u = 0 & text {in} partial Omega end {cases}$$
(the ongoing problem)?

Posted on

## reference request – Energy estimation for linear hyperbolic system (without Fourier)

Where can I find proof of an energy estimate (under appropriate assumptions) for the following linear hyperbolic system which is not based on Fourier methods?

$$frac { partial U} { partial t} + sum_ {j = 1} ^ m A_j frac { partial U} { partial x_j} + B cdot U = 0,$$
or $$x in mathbb R ^ m$$ and $$U in mathbb R ^ n$$ and $$A$$ is a symmetric matrix.

Posted on