{"id":13288274,"url":"https://github.com/rmaestre/variableStars","last_synced_at":"2025-03-10T05:32:20.093Z","repository":{"id":145816387,"uuid":"156341612","full_name":"rmaestre/variableStars","owner":"rmaestre","description":"Optimized package for extract patterns on variable stars","archived":false,"fork":false,"pushed_at":"2020-04-08T05:11:22.000Z","size":74385,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-23T03:02:33.404Z","etag":null,"topics":["astrophysics","corot","cpp","neural-networks","r","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rmaestre.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-06T07:14:05.000Z","updated_at":"2020-04-08T05:11:24.000Z","dependencies_parsed_at":"2023-04-17T16:16:44.152Z","dependency_job_id":null,"html_url":"https://github.com/rmaestre/variableStars","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmaestre%2FvariableStars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmaestre%2FvariableStars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmaestre%2FvariableStars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmaestre%2FvariableStars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmaestre","download_url":"https://codeload.github.com/rmaestre/variableStars/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242798338,"owners_count":20186882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astrophysics","corot","cpp","neural-networks","r","tensorflow"],"created_at":"2024-07-29T16:56:17.415Z","updated_at":"2025-03-10T05:32:20.080Z","avatar_url":"https://github.com/rmaestre.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n[![Build Status](https://travis-ci.org/rmaestre/variableStars.svg?branch=master)](https://travis-ci.org/rmaestre/variableStars)\n\nIntroduction\n------------\n\nVariable Star package provides the main funtions to analized patterns on the [oscilation modes of variable stars](https://en.wikipedia.org/wiki/Asteroseismology). \n\n\u003cimg src=\"https://raw.githubusercontent.com/rmaestre/variableStars/master/docs/figures/oscilationModes.png\" data-canonical-src=\"https://raw.githubusercontent.com/rmaestre/variableStars/master/docs/figures/oscilationModes.png\" width=\"200\" /\u003e\n\n\nAll the code is based on these two papers:\n\n-   [Asteroseismic analysis of the CoRoT *δ* Scuti star HD 174936](https://www.aanda.org/articles/aa/full_html/2009/40/aa11932-09/aa11932-09.html)\n\n-   [An in-depth study of HD 174966 with CoRoT photometry and HARPS spectroscopy](https://www.aanda.org/articles/aa/full_html/2013/11/aa20256-12/aa20256-12.html)\n\n\nInstallation\n------------\n\n``` r\ninstall.packages(\"devtools\")\nlibrary(devtools)\ninstall_github(\"rmaestre/variableStars\")\n```\n\n#### ** Note for Windows users **\n\nWe strongly recommend to use [The Microsoft R Open \u0026 MKL R distribution](https://mran.microsoft.com/open) as R distribution.\n\nAlso, **please** do not forgive to include the file ```Makevars.win``` into the **src** project folder with the next content:\n\n```\nCXX_STD = CXX11\n\nPKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) \nPKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)\n```\n\n\nAn UI for experimentation with synthetic data is provided\n---------------------------------------------------------\n\n``` r\nlibrary(variableStars)\nrunUISynthetic()\n```\n\u003cimg src=\"https://raw.githubusercontent.com/rmaestre/variableStars/master/docs/figures/ui.png\" data-canonical-src=\"https://raw.githubusercontent.com/rmaestre/variableStars/master/docs/figures/ui.png\" width=\"300\" /\u003e\n\nExample of use on a pulsar data\n-------------------------------\n\n\nPlease, find [here](docs/Experiment_-_HD174936.md) or [here](docs/Experiment_-_HD174966.md) the main execution of the complete package procedure.\n\nMain Workflow\n-------------\n\n\u003cimg src=\"https://raw.githubusercontent.com/rmaestre/variableStars/master/docs/figures/diagrams.png\" data-canonical-src=\"https://raw.githubusercontent.com/rmaestre/variableStars/master/docs/figures/diagrams.png\" width=\"500\" /\u003e\n\n\n\n(The pulsar in the Crab Nebula is composed by images taken by Hubble (red) and Chandra X-Ray(blue))\n\n\nImplementation\n-------------\n\nAll core funcionalities are programmed [in C++ using RcppArmadillo integrated through Rcpp](https://github.com/rmaestre/variableStars/blob/master/src/tools.cpp). An example of function to calculate all differences between pair of element using Armadillo C++ library, iterators and std operattions:\n\n```c\n  // Calculate all frequences differences\n  int n = frequences.n_elem;\n  int diagSupElements = n * (n - 1) / 2;\n  arma::vec diff(diagSupElements); // Number of elements in the sup. diag.\n  NumericVector::iterator it_first, it_second, it_diff;\n  it_diff = diff.begin(); // output iterator\n  int countElements = 0;\n  // Double loop (n^2 complexity)\n  for (it_first = frequences.begin(); it_first \u003c frequences.end(); it_first++) {\n    for (it_second = it_first; it_second \u003c frequences.end() \u0026 it_diff \u003c diff.end(); it_second++) {\n      if (it_first != it_second) { // Jump same elements\n        * it_diff =\n          std::abs( * it_second - * it_first); // Save absolute difference\n        if ( * it_diff != 0) {\n          it_diff++; // Increase pointer\n          countElements++; // Increase elements\n        }\n      }\n    }\n  }\n  // Remove unused memory\n  diff.resize(diagSupElements - (diagSupElements - countElements));\n  // Return results\n  return diff;\n}\n```\n\nHowever, all code can be call from R easily with the next function\n```r\nresult \u003c- process(\n  data$frequency,\n  data$amplitude,\n  filter = \"uniform\",\n  gRegimen = 0,\n  minDnu = 15,\n  maxDnu = 95,\n  dnuValue = -1,\n  dnuGuessError = 10,\n  dnuEstimation = TRUE,\n  numFrequencies = 30,\n  debug = TRUE\n)\n```\n\n\n\nDeep Neural Networks\n------------\n\nThis package is also used as feature engineering in [Deep Neural Network application to *Dnu* and *dr*  estimation](https://github.com/rmaestre/astroseismologyNN\n).\n\n\u003cimg src=\"https://raw.githubusercontent.com/rmaestre/variableStars/master/docs/figures/nn-approach.png\" data-canonical-src=\"https://raw.githubusercontent.com/rmaestre/variableStars/master/docs/figures/nn-approach.png\" width=\"400\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmaestre%2FvariableStars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmaestre%2FvariableStars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmaestre%2FvariableStars/lists"}