Giter Club home page Giter Club logo

data-cleaning-using-pandas-and-numpy-'s Introduction

Data-cleaning-using-Pandas-and-Numpy-

A Cepheid variable is a type of star that, due to some inherent instability, pulsates radially, varying in both diameter and temperature and producing changes in brightness with a well-defined stable period and amplitude. As it turns out, the period of pulsation and the Luminosity (i.e the absolute magnitude) of the Cephied are related.

We'll use data of cepheids from the Small Magallenic Cloud (SMC) obtained by a survey called Optical Gravitational Lensing Experiment (OGLE). The Small Magellanic Cloud is a dwarf galaxy satellite of the Milky Way, and distances to any star in it can be assumed to be almost constant. So the magnitudes translated directly into absolute magnitudes with some offset dependent on the distance to the SMC!

Data Cleaning

The data file given consists of 'ID', the identifier for the star, 'RA', the right ascension in HMS format; 'Decl', the declination in DMS format; 'I', the band magnitude; 'V. the V band magnitude; 'P_1', the period.

Some entries in the V and I band magnitude have a value of -99.990, so we do not want to use these stars for further analysis. Remove such entries. Further, convert the RA and Dec values to degrees from HMS and DMS respectively. You might find Pandas convenient for the above purposes.

In [15]:

#Code here

Plot the RA, Dec coordinates in a sky grid using Matplotlib. (Hint: Look up Mollweide projections in Matplotlib)

In [16]:

#Code here

P-L Diagrams

Plot the Magnitude vs log(Period) for V and bands. Observe that a linear fit can be done to obtain the period magnitude relation for each band separately. Use scipy's curve fit module to obtain the relation for both V and I band. The P-L relation is of the form

m = a log(P) + I

where m is the apparent magnitude, a is the slope, P is period and I is the intercept

data-cleaning-using-pandas-and-numpy-'s People

Contributors

wittyicon29 avatar

Watchers

 avatar

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.