Giter Club home page Giter Club logo

mjdsiggen.jl's Introduction

MJDSigGen.jl

Documentation for stable version Documentation for development version License Build Status Codecov

Documentation

MJDSigGen.jl provides a Julia wrapper around David Radford's field-calculation and signal-generation package for non-segmented high-purity Germanium detectors, mjd_siggen.

If you refer to this software in a scientific publication, please primarily cite the mjd_siggen package and it's author, David Radford.

The mjd_siggen C-code is included in this Julia package, with kind permission of the author.

mjdsiggen.jl's People

Contributors

lmh91 avatar luapulu avatar oschulz avatar tcomellato avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mjdsiggen.jl's Issues

Add regression tests

I'd like to simulate some signals / paths from older version of the package and check that new version produce the same output. None of the current tests really test if someone has messed with the simulation.

malloc error comes up seemingly at random

When using MJDSigGen, I seem to get the following error at random:

julia(24106,0x107048dc0) malloc: *** error for object 0x7f9a308a3400: pointer being freed was not allocated
julia(24106,0x107048dc0) malloc: *** set a breakpoint in malloc_error_break to debug

signal (6): Abort trap: 6
in expression starting at none:0
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 41926025 (Pool: 41914119; Big: 11906); GC: 36

I think I can reproduce the error with the following snippet but I'm unsure if the error I get there is actually the same as the error I get when I just use MJDSigGen in my other code. I don't call signal_calc_finalize! explicitly anywhere. I suspect julia garbage collection might be calling it though, so may be that's why I keep getting errors.

using MJDSigGen: signal_calc_init, signal_calc_finalize!

setup = signal_calc_init(path_to_config)
signal_calc_finalize!(setup)

# Here comes the error...
setup2 = signal_calc_init(path_to_config)

Edit: actually, if I don't run that snippet in Juno, but just run it in the terminal I can reproduce the error with just:

using MJDSigGen: signal_calc_init

setup = signal_calc_init(path_to_config)
setup2 = signal_calc_init(path_to_config)

This is an issue for me, since I'd like to be able to run signal generation from one config file in parallel in multiple processes.

Is anybody still maintaining this?

We're using MJDSigGen.jl for our work and I was wondering if anybody is still maintaining this code. We have some patches we might want to open merge requests for.

Define equality and show method for SigGenSetup

For testing especially, it would be good to define what makes two setup objects equal. When we decide what the essential properties of a setup object are, we can also write a nicer show method.

Write some docs

I'm thinking at a minimum we should have

  • a basic usage section (start with config -> fieldgen -> signal_calc_init -> get_signal! -> get path / charge size, etc. from setup)
  • docstrings for SigGenSetup, get_signal!, fieldgen, signal_calc_init

`with_group_effects` convenience function

At some point I wasted a few days of compute time because I had accidentally left diffusion, acceleration and repulsion on when I didn't mean to. Since then I turn group effects off in my configs, so the config really only defines the geometry, impurities, etc. and I configure group effects in the code (see following example), because turning them on or off tends to be part of the logic of the code, rather than a preset config that stays constant.

result = with_group_effects(setup, E, cloud_size) do stp
    # do something with the stp, using group effects
    return result
end

For people who usually need group effects but sometimes turn it off, I can also add another method like so:

result = with_group_effects(:off, setup) do stp
    # do something with the stp, not using group effects
    return result
end

This way, people can turn it :off or :on.

If there's interest, I can make a pull request and add it in. May be in utils.jl?

Merge siggen code into upstream repo

  • We should see about merging the c-code here with the upstream siggen here
  • Then we can remove the dependencies here and build dependencies from the upstream repo directly

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.