Code Monkey home page Code Monkey logo

match's People

Contributors

dweisz avatar mfouesneau avatar nell-byler avatar philrosenfield avatar sgossage avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

sgossage

match's Issues

Common file extensions

In scripts/ I assume some common file extensions that I notice are different from Jake's codes. Mine are hard coded in calcsfh_parallel.py. Perhaps we should have a file that can be imported as a dictionary file-type: file-ext, or just decide on common file extensions for the different MATCH input/output files.

completeness plots

We should add vertical lines to the completeness vs. mag plots indicating the 50% (and maybe other) completeness values.

Multiple filterset support

need .cmd reader and asts to support PHAT-like 4-filters.

for .cmd reader, each cmd is pasted below one can split the file.
for the asts, need to read in 8 columns instead of 4.

Code unification: pgpro

Q: How should the python implementation of pgpro look?

Background:
Currently, there are two areas of where this codebase has duplicate/competing code. This issue focuses on one, the python implementation of MATCH/pgpro:
residual_plot/Hess_plot.py
and
scripts/graphics/match_plot.py

I added png outputs of both codes Hess_plot_out.png and match_plot_out.png to residual_plot/Hess_plot for comparison.

There are aesthetic differences between the Hess_plot and match_plot, where the color bars are, and where the labels are. Do users prefer one or the other, or should there be an option for one or the other?

[End of question, below is more information]
Going forward:
I'd like to stick to the match_plot interface, which follows the scripts interface. That is, a class for each major input/output from MATCH, in this case, CMD output file class.

So to make the pgpro-like image:
python -m match.scripts.cmd out.cmd
or
python ~/match/scripts/cmd.py out.cmd

and one interested in the API would access match_plot which already has extra options to take a colormap (or list of them), make the image grid 2x2 or 1x4 (or 1x3 and drop the significance figure, which I see often omitted in papers), and can expand to have other options, like kwargs to pass to imshow (the two codes have different hard coded plt.imshow interpolation) and will include grabbing the exclude/include gate code from CMD.pgpro to ensure match_plot is stand alone)

Clean API Core needed

There is more and more spikes added to big pile of scripts. Examples are not clear or completely absent.
It makes it very hard to even attempt to integrate existing code to anything.

A solid API core is needed to properly build tools upon it.

Python3 compatibility

Currently, most scripts here are not compatible with Python3.

"from future import absolute_import "

does not solve this.

For now, use python 2.xx.

completeness fraction

asts.completeness_plot(comp_fracs=[0.5])

gives:


TypeError Traceback (most recent call last)
in ()
----> 1 asts.completeness_plot(comp_fracs=[0.5])

/Users/dweisz/Documents/code/match/scripts/asts.pyc in completeness_plot(self, ax, comp_fracs)
537
538 if comp_fracs is not None:
--> 539 self.add_complines()
540 ax.set_xlabel(r'${{\rm mag}}$', fontsize=20)
541 ax.set_ylabel(r'${{\rm Completeness\ Fraction}}$', fontsize=20)

TypeError: add_complines() takes at least 2 arguments (1 given)

Astropy units

At least for log or linear ages, perhaps we should implement astropy units. Currently in scripts.ssp there is a gyr switch that will plot and print ages in Gyr instead of log age. I can think of cases where Myr would also be useful...

input file templates

Change scripts.fileio format functions to json format or something similar in a dedicated template folder

Usage Examples

Given the growing diversity of code, I think we need to provide more examples (e.g., input files, plots) of how to use the code and what to expect as correct output. It would probably be better do this on a folder-by-folder basis? Let's iterate on this.

loading scripts + config error

I'm trying to import a module from the scripts folder, but am unable to do so:

In [1]: import match.scripts.asts

ImportError Traceback (most recent call last)
in ()
----> 1 import match.scripts.asts

/Users/dweisz/Documents/code/match/scripts/init.py in ()
1 """ Everything that relates to MATCH """
----> 2 from config import *
3 from . import graphics
4 from . import likelihood
5 from . import diagnostics

something appears to be wrong with 'config'.

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.