Skip to content

fengwangPhysics/resourceForSoftMatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 

Repository files navigation

resourceForSoftMatter

free online resource for soft matter (colloid) research

Contents

Particle tracking

Movie/Image

  • ffmpeg for making movies, and converting movie to images. It is a cross-platform solution to record, convert and stream audio and video. It includes libavcodec - the leading audio/video codec library. h.264 encoder is not included in this library. Hence if h.264 is the desired format, it is necessary to install x264 and compile ffmpeg with x264 enabled. Here is an example to use ffmpeg (10 fps, bitrate: 1MB/s) in bash in Linux
ffmpeg -i figs/%04d.png -vcodec mpeg4 -r 10 -b:v 1M output.avi
  • html files can embed videos, so that one can use browser to show movie. Media formats supported by HTML (Browser compatibility) should be

    • Theora and Vorbis in Ogg
    • H.264 and MP3 in MP4
    • H.264 and AAC in MP4
    • WebM
  • In PowerPoint 2013 and later, for the best video playback experience, it is recommended to use .mp4 files encoded with H.264 video (a.k.a. MPEG-4 AVC) and AAC audio. For audio, use .m4a files encoded with AAC audio.

  • ImageMagick: Convert, Edit, Or Compose Bitmap Images

  • import tool from ImageMagick can be used to capture the screenshot. Run

import screenshot.png

and select the window you want to capture or select a region by pressing the left mouse button and dragging. Ref: http://askubuntu.com/questions/194427/what-is-the-terminal-command-to-take-a-screenshot

  • Inkscape is professional quality vector graphics software which runs on Linux, Mac OS X and Windows desktop computers. It can be used to extract and edit figures from scientific papers in PDF format. Its default format is SVG. To convert pdf figures to SVG, one can use pdftocairo which has been installed on most Linux computers:
pdftocairo -svg input.pdf
  • https://en.wikipedia.org/wiki/Phi shows the Unicode for different forms of greek letter phi. The most important one is U+03D5, which shows the phi letter similar to the latex font, commonly used in math and technical contexts.

  • pims: Python Image Sequence: Load video and sequential images in many formats with a simple, consistent interface. It has the same authors as trackpy.

  • moviepy is a Python module for video editing. It can read and write all the most common audio and video formats, including GIF, and runs on Windows/Mac/Linux

  • neural-enhance Super Resolution for images using deep learning.

Big data visualization

  • Bokeh is a python project which targets browser-based graphics, and recent releases are beginning to do big data in the browser the right way.

  • VisPy is another effort to provide easy visualization of large datasets with python. It is based on OpenGL, with plans to add a WebGL backend.

  • mpld3 brings together Matplotlib, the popular Python-based graphing library, and D3js, the popular Javascript library for creating interactive data, which can output SVG files. The library may require a little knowledge on javascript to enable flexible functions. It provides an interactive way to data visualization, rather than aiming on big data. d3.js gallery: https://github.com/d3/d3/wiki/Gallery. An example can be found: Visualizing MBTA Data: http://mbtaviz.github.io/

  • OVITO is a scientific visualization and analysis software for atomistic simulation data developed by Alexander Stukowski at Darmstadt University of Technology, Germany. It can be also used to visualize experimental data if the data is saved as the one of the following formats: LAMMPS, XYZ, IMD, CFG, POSCAR, AMBER/NetCDF, PDB, GSD/HOOMD, and VTK. See the description of those formats: http://ovito.org/manual/usage.import.html

  • https://github.com/jbmouret/matplotlib_for_papers uses matplotlib to plot statistical figures. Good example for box plot, Stars (statistical significance).

  • pubplot is a python module for making publication-quality figures with matplotlib.

  • Practical Data Visualization (ppt)

Crystal defect identification

  • OVITO implemented dislocation detection (DXA).

  • BiDef is a python package using supervised machine learning for crystal defect identification. See details in the author's paper. It also seems that the package has something to do with ovito.

  • Atoman provides a python wrapper (written by C extension) on voro++, and algorithms to detect point defects by voronoi.

Thesis

Online learning materials

Linux

Latex and PDF files

  • Latex Wikibook is a very good start point to learn latex.

  • Overleaf is an online LaTeX and Rich Text collaborative writing and publishing tool that makes the whole process of writing, editing and publishing scientific documents much quicker and easier.

  • An interactive introduction to LaTeX using Overleaf.

  • Overleaf templates: Start your projects with quality LaTeX templates for journals, CVs, resumes, papers, presentations, assignments, letters, project reports, and more.

  • zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources. It is a useful reference manager which can export bibtex.

  • How to use ZOTERO

  • Official repository for Citation Style Language (CSL) citation styles

  • merge PDF files:

  • pdfunite is a part of poppler, however, someone pointed out that the output.pdf may be very large while gs packs a small size.

pdfunite in1.pdf in2.pdf out.pdf
  • use gs
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf

Useful data structures and algorithms

def centerOfMass(x, L):
    """Suppose x is in interval [0,L]"""
    theta = x/L*2.*np.pi
    xi = np.cos(theta)
    zeta = np.sin(theta)
    thetaBar = np.arctan2(-zeta.mean(), -xi.mean()) + np.pi
    return L*thetaBar/2./np.pi