Skip to content

Commit

Permalink
removing old prints
Browse files Browse the repository at this point in the history
  • Loading branch information
rmdocherty committed Jul 30, 2024
1 parent 2f601c1 commit f962615
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import "./assets/scss/App.scss";
import 'bootstrap/dist/css/bootstrap.min.css';

//const PATH = "http://127.0.0.1:5000";
const PATH = "https://samba-segment.azurewebsites.net";
//const PATH = "http://localhost:7071/api";
const PATH = "https://representative.azurewebsites.net/api"
//const PATH = "https://representative.azurewebsites.net/api"
const PF_ENDPOINT = PATH + "/phasefraction"
//const PF_ENDPOINT = "https://representativity.azurewebsites.net/phasefraction"

Expand Down Expand Up @@ -130,6 +131,8 @@ const App = () => {

const absErr: number = obj["abs_err"]

console.log(obj)

setMenuState('conf_result_full');
setAnalysisInfo({
integralRange: obj["cls"],
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/components/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ const PreviewCanvas = () => {
const correctDims = getAspectCorrectedDims(ih, iw, ch, cw, faceData.dox, faceData.doy, ADDITIONAL_SF);
ctx?.clearRect(0, 0, canvas.width, canvas.height);
if (faceData.dox > 0) {
console.log(faceData)
console.log(correctDims.oy)
drawFaces(ctx!, faceData.face1, faceData.face2, correctDims.sf, correctDims.ox, correctDims.oy)
}
ctx?.drawImage(image, correctDims.ox, correctDims.oy, correctDims.w, correctDims.h);
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ const Result = () => {
// we have two errVFs here because we want the values in the text to reflect the old
// errVF, the one they sent to the server and the slider to represent the new one
// which they are setting for recalculate.

// TODO: THERE IS RACE CONDITION BETWEEN ACCURATE PFS AND RESULTS: I.E IF ONE
// NOT RETURNED WEBSITE FALLS OVER - NOT GOOD. FIX
// MAY EVEN BE LAG IN COUNTING PHASE FRACS
const [newErrVF, setNewErrVF] = useState<number>(5);
const pfResultRef = useRef<HTMLHeadingElement>(null);
const lResultRef = useRef<HTMLHeadingElement>(null);
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/NormalSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ const NormalSlider = () => {
const pxLBx = xDataToPx(newLB, params.start_pf, params.end_pf, CANVAS_WIDTH);
const pxUBx = xDataToPx(newUB, params.start_pf, params.end_pf, CANVAS_WIDTH);

console.log(pxLBx, pxUBx, newLB, newUB)

const nNew = pxUBx - pxLBx;
const inds = [...Array(nNew).keys()].map((x) => (x + pxLBx));
Expand Down Expand Up @@ -235,7 +234,7 @@ const NormalSlider = () => {
const result = getPredictionInterval(selectedConf / 100, analysisInfo?.pf!, analysisInfo?.cumSumSum!)
const [lbData, ubData] = [result[0], result[1]]
const sigma = (ubData - lbData) / 4 // sigma should be fixed as ub and lb changes - this should be reflected in results as well
console.log(analysisInfo?.stdModel!, sigma)

const newMaxY = normalDist(phaseFrac, phaseFrac, analysisInfo?.stdModel!)
const newStartPf = phaseFrac - 4 * sigma
const newEndPf = phaseFrac + 4 * sigma
Expand Down
2 changes: 1 addition & 1 deletion representativity/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ def find_end_dist_tpc(
"""Defines search range for endpoint, calls main fn"""
# Assumption is image is at least 200 in every dimensoom
# TODO: signpost in paper?
max_img_dim = np.max(dist_arr)
max_img_dim = np.max(dist_arr) # len(dist_arr) # np.max(dist_arr)
if max_img_dim < 200:
print(f"Max img dim of {max_img_dim} < 200px, using small method")
# this gives more unstable results but works for smaller images
Expand Down

0 comments on commit f962615

Please sign in to comment.