PageSourceSearch

https://matchboxscope.github.io/assets/js/ce60674a.76e66887.js

js matchboxscope.github.io collected 2026-10-03 09:34:45 UTC 7,739 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkMatchboxscope=self.webpackChunkMatchboxscope||[]).push([[1669],{5680:(e,t,n)=>{n.d(t,{xA:()=>c,yg:()=>f});var o=n(6540);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),p=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},c=function(e){var t=p(e.components);return o.createElement(s.Provider,{value:t},e.children)},g="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},h=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),g=p(n),h=r,f=g["".concat(s,".").concat(h)]||g[h]||u[h]||i;return n?o.createElement(f,a(a({ref:t},c),{},{components:n})):o.createElement(f,a({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=h;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[g]="string"==typeof e?e:r,a[1]=l;for(var p=2;p<i;p++)a[p]=n[p];return o.createElement.apply(null,a)}return o.createElement.apply(null,n)}h.displayName="MDXCreateElement"},873:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var o=n(8168),r=(n(6540),n(5680));const i={},a="ESP32-based InLine Holography Microscope",l={unversionedId:"Variants/Holoscope",id:"Variants/Holoscope",title:"ESP32-based InLine Holography Microscope",description:"TEXT",source:"@site/docs/Variants/Holoscope.md",sourceDirName:"Variants",slug:"/Variants/Holoscope",permalink:"/docs/Variants/Holoscope",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Fluidiscope",permalink:"/docs/Variants/Fluidiscope"},next:{title:"Matchboxscope (Older simpler version)",permalink:"/docs/Variants/Matchboxscope"}},s={},p=[{value:"Bill of material",id:"bill-of-material",level:3},{value:"3D printing files",id:"3d-printing-files",level:2},{value:"CAD Files",id:"cad-files",level:2},{value:"Assembly Process",id:"assembly-process",level:2},{value:"Reconstruction code:",id:"reconstruction-code",level:2},{value:"Online-based Pyscript",id:"online-based-pyscript",level:3},{value:"Python",id:"python",level:3},{value:"Reults",id:"reults",level:2}],c={toc:p},g="wrapper";
1function u(e){let{components:t,...i}=e;return(0,r.yg)(g,(0,o.A)({},c,i,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"esp32-based-inline-holography-microscope"},"ESP32-based InLine Holography Microscope"),(0,r.yg)("p",null,"TEXT"),(0,r.yg)("h1",{id:"assembly"},"Assembly"),(0,r.yg)("p",null,"TEXT"),(0,r.yg)("h3",{id:"bill-of-material"},"Bill of material"),(0,r.yg)("table",null,(0,r.yg)("thead",{parentName:"table"},(0,r.yg)("tr",{parentName:"thead"},(0,r.yg)("th",{parentName:"tr",align:"center"},"Part"),(0,r.yg)("th",{parentName:"tr",align:"center"},"Purpose"),(0,r.yg)("th",{parentName:"tr",align:"center"},"Source"),(0,r.yg)("th",{parentName:"tr",align:"center"},"Price")))),(0,r.yg)("h2",{id:"3d-printing-files"},"3D printing files"),(0,r.yg)("p",null,"All design files can be found in the release from the ",(0,r.yg)("a",{parentName:"p",href:"https://github.com/Matchboxscope/Matchboxscope/releases/tag/ESPMicroscopeCollectionv2"},"Matchboxscope Releases")," (Look for miniplanktoscope)."),(0,r.yg)("p",null,"All 3D-printable files can be found ",(0,r.yg)("a",{parentName:"p",href:"./STL/Anglerfish_JAR"},"here"),":"),(0,r.yg)("h2",{id:"cad-files"},"CAD Files"),(0,r.yg)("p",null,"The release files can be found ",(0,r.yg)("a",{parentName:"p",href:"https://github.com/Matchboxscope/Matchboxscope/releases/download/ESPMicroscopeCollectionv2/CAD_PlanktoscopeMini.zip"},"https://github.com/Matchboxscope/Matchboxscope/releases/download/ESPMicroscopeCollectionv2/CAD_PlanktoscopeMini.zip")),(0,r.yg)("h2",{id:"assembly-process"},"Assembly Process"),(0,r.yg)("h2",{id:"reconstruction-code"},"Reconstruction code:"),(0,r.yg)("h3",{id:"online-based-pyscript"},"Online-based Pyscript"),(0,r.yg)("p",null,"Please visit the following website and upload your hologram: ",(0,r.yg)("a",{parentName:"p",href:"https://matchboxscope.github.io/pyscript/index_holo.html"},"https://matchboxscope.github.io/pyscript/index_holo.html"),"\nThe data won't leave your computer. Everything is implemented in pyodide/pyscript. The source code can be found here ",(0,r.yg)("a",{parentName:"p",href:"https://github.com/Matchboxscope/matchboxscope.github.io/blob/main/static/pyscript/image_upload_pillow.py"},"https://github.com/Matchboxscope/matchboxscope.github.io/blob/main/static/pyscript/image_upload_pillow.py")),(0,r.yg)("p",null,"As of now: The reconstruction distance is constant as I don't know how to make this a parameter. "),(0,r.yg)("h3",{id:"python"},"Python"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-py"},'#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n"""\nCreated on Thu Jun 22 22:00:20 2023\n\n@author: bene\n"""\n\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport NanoImagingPack as nip\n\ndef reconstruct_inline_hologram(hologram, wavelength, ps, distance):\n\n# Inverse space\n     Nx = hologram.shape[1]\n     Ny = hologram.shape[0]\n     fx = np.linspace(-(Nx-1)/2*(1/(Nx*ps)), (Nx-1)/2*(1/(ps*Nx)), Nx)\n     fy = np.linspace(-(Ny-1)/2*(1/(ps*Ny)), (Ny-1)/2*(1/(ps*Ny)), Ny)\n     Fx, Fy = np.meshgrid(fx, fy)\n\n     kernel = np.exp(1j*(2 * np.pi / wavelength) * distance) * np.exp(1j * np.pi * wavelength * distance * (Fx**2 + Fy**2))\n\n     # Compute FFT centered about 0\n     E0fft = np.fft.fftshift(np.fft.fft2(hologram))\n\n     # Multiply spectrum with fresnel phase-factor\n     G = kernel*E0fft\n     Ef = np.fft.ifft2(np.fft.ifftshift(G))\n     return Ef\n\n\nimgHolo = plt.imread(\'/Users/bene/Downloads/ecoli.jpeg\')\nimgHolo = imgHolo/nip.gaussf(imgHolo, 25)\n\nfor iz in np.linspace(1,10,50):\n    img=reconstruct_inline_hologram(imgHolo[:,:,2], wavelength=450e-9, ps=5e-6 , distance=iz*1e-3)\n    plt.imshow(np.abs(img), cmap=\'gray\'), plt.title("dz"+str(iz*1e-3))\n    plt.savefig("ecoliDefocusEsp32"+str(iz)+".png")\n    plt.show()\n')),(0,r.yg)("h2",{id:"reults"},"Reults"),(0,r.yg)("p",null,"![](IMAGES/holoscope/git\n2023_11_14-Holo_Laser_USAF-1.gif)"),(0,r.yg)("p",null,(0,r.yg)("img",{src:n(224).A,width:"600",height:"360"})),(0,r.yg)("p",null,(0,r.yg)("img",{src:n(7329).A,width:"312",height:"312"})))}u.isMDXComponent=!0}
1,7329:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/2023_11_14-Holo_Laser_USAF-1-9f3c585ffe35a2df995b94159f420e3d.gif"},224:(e,t,n)=>{n.d(t,{A:()=>o});const o=n.p+"assets/images/ESP32_HoloReconstruction-928e768d27e92326be68f331c72b327f.gif"}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.