Coder Social home page Coder Social logo

milk-org / milk Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 9.0 5.54 MB

Modular Image processing Library toolKit (milk) :telescope:

Home Page: https://milk-org.github.io/milk/

CMake 1.54% C 93.12% C++ 0.91% Shell 3.32% Yacc 0.36% Lex 0.13% Python 0.60% Dockerfile 0.03%
astronomy fps image-analysis image-processing processinfo real-time

milk's People

Contributors

a-sevin avatar ajameson avatar dasvinch avatar drbitboy avatar floferreira avatar guptavaibhav0 avatar janis-hag avatar jaredmales avatar joseph-long avatar nour-sf avatar oguyon avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

milk's Issues

CLI not printing help function???

I was digging on replacement following the deletion of creaimshm et al at 7a6aa92. Which may break a number of 3-rd party scripts... TBC...

I see in the commit message that creaimshm is replaced with mk2Dim and mk3Dim. So far so good.

Now, the info I was really looking for, is this (from image_make2D.c):

// detailed help
static errno_t help_function()
{
    printf(
        "Create 2D image\n"
        "File name can be appended with attribute:\n"
        "For example: \"s>im1\", indicates a shared memory image (attribute "
        "\"s\")\n"
        "Attributes list:\n"
        "    s>      shared memory\n"
        "    k20>    number of keyword=20\n"
        "    c5>     5-deep circular buffer for logging\n"
        "    tui8>   type unsigned int 8-bit\n"
        "    tsi8>   type signed int 8-bit\n"
        "    tui16>  type unsigned int 16-bit\n"
        "    tsi16>  type signed int 16-bit\n"
        "    tui32>  type unsigned int 32-bit\n"
        "    tsi32>  type signed int 32-bit\n"
        "    tui64>  type unsigned int 64-bit\n"
        "    tf32>   type float 32-bit\n"
        "    tf64>   type float 64-bit\n");

    return RETURN_SUCCESS;
}

however... the CLI help only yields

mk2Dim in COREMOD_memory []
	make 2D image
	example> mk2Dim out1 512 512
	src: /home/vdeo/src/milk/src/COREMOD_memory/image_make2D.c
    [ ON]  FPS support
    [OFF]  processinfo support (..procinfo 0/1)

  CLI call arguments:
     0   .out_name        [  STR  ]  s>yo          output image
     1   .xsize           [ int64 ]  100           x size
     2   .ysize           [ int64 ]  100           y size

How do you get the CLI to yield the full help_function????

arrgghh milk broken?

It looks like a few of the submodules and/or other pieces of milk have changed recently (e.g. the signature for delete_image), can anyone give me a road map to get things back together?

Jared and I have a fork of milk/dev called resurrector, and I think some items are out of sync with the submodules? maybe? e.g.

‘const struct pybind11::buffer_info’ has no member named ‘item_type_is_equivalent_to’

Thanks, Brian

Expose number of files option for logging SHM

Long story short I'm looking for the option to log a SHM and have it automatically stop logging after N cubes. Lo and behold, the logic seems to already exist in the c-code, but the variable is not exposed in the function, and is not propagated into any of the downstream code that relies on this (e.g., milk-logshim, any of the camstack code, etc.).

https://github.com/milk-org/milk/blob/3457402c102fdaced7026e6e89108f55c2e4fe88/src/COREMOD_memory/logshmim.c#LL662C36-L662C36

I presume this would just work, but has it been tried before? This kind of option would be very good to use when designing the control software for the VAMPIRES upgrade, and I think it would improve certain aspects of the FastPDI workflow.

I think a good CLI would be

milk-logshim <shm> <nsub> [<ncubes>] <directory>

such that

milk-logshim apapane 1000 /media/data

would do what you expect and is backward-compatible while

milk-logshim apapane 1000 10 /media/data

would stop after 10 cubes.

STRINGMAXLEN_FILE_NAME’ undeclared in isio-stream-info.c

Freshest of fresh clones gives this:

[ 99%] Building C object src/isio-tools/isio-stream-info-1line/CMakeFiles/isio-stream-info.dir/isio-stream-info.c.o
/opt/MagAOX/source/milk/src/isio-tools/isio-stream-info-1line/isio-stream-info.c: In function ‘main’:
/opt/MagAOX/source/milk/src/isio-tools/isio-stream-info-1line/isio-stream-info.c:49:28: error: ‘STRINGMAXLEN_FILE_NAME’ undeclared (first use in this function); did you mean ‘STRINGMAXLEN_IMAGE_NAME’?
49 | char fname[STRINGMAXLEN_FILE_NAME];
| ^~~~~~~~~~~~~~~~~~~~~~
| STRINGMAXLEN_IMAGE_NAME
/opt/MagAOX/source/milk/src/isio-tools/isio-stream-info-1line/isio-stream-info.c:49:28: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [src/isio-tools/isio-stream-info-1line/CMakeFiles/isio-stream-info.dir/build.make:76: src/isio-tools/isio-stream-info-1line/CMakeFiles/isio-stream-info.dir/isio-stream-info.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2423: src/isio-tools/isio-stream-info-1line/CMakeFiles/isio-stream-info.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

[Repo arch] Merging submodules as plain folders?

As we're onboarding more potential contributing devs, I'm thinking for traceability to nuke the pseudo-submodule structure of the plugins/ folder and merge all the code as simple folders, traced withing this repository.

  • This would result in not having to use fetch_milk_dev if working only on MILK+plugins.
  • ImageStreamIO would remain a full-standing submodule
  • CACAO would remain a hidden submodule same as current (untracked folder, pull dev with ./fetch_cacao_dev.

The fact that the code is additional modules and are not required for core functionality could be implemented with a compilation flag, with e.g. a -DCORE_ONLY option that would ignore the automatic enumeration of extra modules in the plugins/ directory and only consider the src/ direcotry.

Is this breaking to anyone? @a-sevin @jaredmales ?

I would avoid merging history trees, as this would cause pull --rebase pain in a lot of locations.

saveFITS does fail for uint8_t images

Saving an image in shared memory to a fits file does not work anymore for UI8 images. Here's what happens:

  • Have an image in shared memory, the datatype is uint8_t, displayed as "UI8" in milk_streamCTRL
  • Start milk CLI
  • readshmim

  • saveFITS "myFits.fits"

  • Get for following error:
FITSIO error 412 [<MILK_ROOT>/src/COREMOD_iofits/savefits.c, saveFITS_opt_trunc, 660]: datatype conversion overflow
 WARNING [ FILE: <MILK_ROOT>/src/COREMOD_iofits/savefits.c   FUNCTION: saveFITS_opt_trunc  LINE: 665 ]
No C error (errno = 0)
 data trucated

This does not happen for uint16_t and float images - I did not try other ones.

milk-branch: dev (commit 29f799d)
ImageStreamIO-branch: dev (commit 2ab382dd4bb774f7aaa9ef67385278e3b53ebca2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.