From Peteco Perez, 1 Year ago, written in R.
This paste is a reply to from - view diff
Embed
  1. setwd("~/Documentos/trabajosdeR/GSCRIPT/G_scripts")
  2. rm(list = ls())
  3. system("rm *.pdf")
  4. system("rm *.out")
  5. require("lomb")
  6. library("lomb")
  7. p_ini <- 1.1
  8. p_fin <- 100
  9. tol <- 15 # [arcsec]
  10. conv <- paste("sh ./convertidor.sh")
  11. system(conv)
  12. stilts <- "/usr/bin/java -jar /home/raul/.stilts/stilts.jar"
  13. input = "~/Documentos/trabajosdeR/GSCRIPT/G_scripts/CCASAS.txt"
  14. star <- read.table("CCASAS.txt")[, c(1)]
  15. run1 <- paste("curl \"http://www.astrouw.edu.pl/cgi-asas/asas_cgi_get_data?", star, ",asas3\" > asas.", star, ".out", sep = "")
  16. run2 <- paste("awk \' { print $1,$2 }\' asas.",star,".out | grep -v \"#\" > asas.",star,".clean.out",sep = "")
  17. arch <- paste("asas.",star, ".clean.out", sep = "")
  18. for (i in 1:length(run1)) {
  19.   system(run1[i])
  20.   system(run2[i])
  21. }
  22. limp <- paste("sh ./limpiador.sh")
  23. system(limp)
  24. for (i in 1:length(star)) {
  25.   file <- paste("asas.", star[i], ".clean.out", sep = "")
  26.   serie <- read.table(file)[, c(1, 2)]
  27.   serie <- subset(serie, serie[[2]] < 20)
  28.   t <- serie[[1]]
  29.   m <- serie[[2]]
  30.   plotpdf <- paste("asas.", star[i], ".clean.pdf", sep = "")
  31.   pdf(file = plotpdf,  paper = "special", width = 10, height = 8, bg = "white")
  32.   plot(t, m, ylim = rev(range(m)))
  33.   dev.off()
  34.   plotpdf <- paste("asas.", star[i], ".period.pdf", sep = "")
  35.   pdf(file = plotpdf,  paper = "special",  width = 10,height = 8,  bg = "white" )
  36.   lspjuan <- lsp( serie,from = p_ini,  to = p_fin,  type = "period",  ofac = 15,  alpha = 0.01,plot = TRUE )
  37.   pps <-  summary(lspjuan)
  38.   dev.off()
  39.   Estrella <- read.table(arch[i], quote = "\"", comment.char = "")
  40.   pps [10, 1]
  41.   Periodo <- pps [10, 1]
  42.   Periodo <- as.numeric(as.character(pps [10, 1]))
  43.   HJD <- (Estrella$V1)
  44.   Mag <- (Estrella$V2)
  45.   HJD1 <- HJD + 2450000
  46.   epoch = 2452246.11
  47.   tiempo <- (HJD1 - epoch) / Periodo
  48.   phase <- tiempo - floor(tiempo)
  49.   Mag <- (Estrella$V2)
  50.   plotpdf <- paste("asas.", star[i], ".phase.pdf", sep = "")
  51.   pdf(file = plotpdf, paper = "special",width = 10, height = 8, bg = "white")
  52.   plot(phase, Mag, type = "p", ylim = rev(range(Mag)), main = paste("Phase Ligthcurve: ASAS", star[i]))
  53.   mtext(paste("Period = ", Periodo, " d"), side=3)
  54.   dev.off()
  55.  
  56. }
  57.  
  58.  
  59.  

captcha

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: codemirror_modes

Filename: view/view_footer.php

Line Number: 6

Backtrace:

File: /var/www/html/pastebin/htdocs/themes/stikkedizr/views/view/view_footer.php
Line: 6
Function: _error_handler

File: /var/www/html/pastebin/htdocs/application/core/MY_Loader.php
Line: 173
Function: include

File: /var/www/html/pastebin/htdocs/application/core/MY_Loader.php
Line: 44
Function: _ci_load

File: /var/www/html/pastebin/htdocs/themes/stikkedizr/views/view/view.php
Line: 114
Function: view

File: /var/www/html/pastebin/htdocs/application/core/MY_Loader.php
Line: 173
Function: include

File: /var/www/html/pastebin/htdocs/application/core/MY_Loader.php
Line: 44
Function: _ci_load

File: /var/www/html/pastebin/htdocs/application/controllers/Main.php
Line: 663
Function: view

File: /var/www/html/pastebin/htdocs/index.php
Line: 315
Function: require_once